lua-users home
lua-l archive

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


Hi guys,

I'm writing a Lua extension which exports popen (a proper one that
works properly on Windows). So I copied the code necessary to create a
new Lua file object from liolib, and found that the resulting object
was (a) definitely a file (b) unable to read without crashing.  I
tried just exporting the function io_open() from liolib, and so even
with a plain FILE* coming from fopen I still had the same problem
using the file object. The FILE* looked fine in the debugger, but any
use of stdio functions on it ended in a sticky mess.

Any extensions out there that create Lua files? I know that liolib
defines a special environment, but that seems basically for private
static variables?

steve d.