lua-users home
lua-l archive

Re: luac output file

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>The 4.0 luac output on my embedded platform has never been correct (3.2 was
>ok). After investigation I found that luac doesn't close the output file.
>I know that it's perfectly within ANSI C to do this type of thing, but C
>library implementations (especially in the embedded world) are often less
>than perfect. Would it be unreasonable to ask that the file be closed?
I'm sorry about that. This has already been fixed in 4.1 alpha.
The fix for 4.0 is 
< if (stripping) strip(tf);
< luaU_dumpchunk(tf,efopen(output,"wb"));
---
> FILE* D;
> if (stripping) strip(f);
> D=efopen(output,"wb");
> luaU_dumpchunk(f,D);
> fclose(D);
--lhf

AltStyle によって変換されたページ (->オリジナル) /