lua-users home
lua-l archive

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


> On Tue Dec 11 2012 @  3:20, Roberto Ierusalimschy wrote:
> > > However, I wasn't able to see a clear way to get at the value of
> > > "current output file" from the C API.
> > 
> > What version of Lua are you using?
> 
> I'm still working with 5.1, but if there is a new relevant feature for 5.2,
> I would be happy to hear about it. (I admit that I didn't look at the 5.2
> API for differences in this area.)

In 5.2 the current output file is stored in the registry, so it is
easy to access it from outside the library. (Currently the key is not
exported in a .h file, but it is easy to copy it: "_IO_output".)

-- Roberto