[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: pass a FILE* from C to Lua
- From: Finn Wilcox <finnw@...>
- Date: Fri, 22 Feb 2013 01:29:26 +0000
I have a FILE* which I would like to pass from a C function to a Lua
function, such that the Lua code can treat it as an io.* file (i.e. call
methods on it like file:read(), file:seek(), file:close() etc.)
Is there any way to do this?
Unfortunately opening the file from within Lua is not possible in this
case; A 3rd-party library has already opened the file (and the API
offers no way to obtain the path.)
- Finn