lua-users home
lua-l archive

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


On 10/27/2013 08:48 PM, Tom N Harris wrote:
On Sunday, October 27, 2013 12:07:47 AM Paul Chavent wrote:
Hi.

I would like to be able to redirect the lua prints.

What's wrong with `_G.print = myprint` ?

Nothing wrong. But a lower level hook allow to specify user data (that can be used to pass a class pointer in my case).


If you're linking Lua into your application, you can already redefine the
luai_write* macros. That's why they're macros.


Yes i link liblua.a in my app, so the luai_write* macro are already expanded. Isn't it ?

Do you suggest i rebuild all the lua sources within my app ?

Regards.

Paul.