lua-users home
lua-l archive

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

>To support rerouting of lua's output into one or more of our app's views, I
>added a field to lua's global_State: a c function ptr, which I stuff on

What output do you mean? In lua.c, all output comes from just two functions:
print_usage and l_message, plus of course print to handle "=" lines in 
interactive mode. It seems to me that it's easier to replace two 3 functions.
>And I then modified luaB_print to instead of going to through fputs, etc, it
>simply calls my handler:

luaB_print is a Lua library, which shouldn't have access to the internals of
lua_State, but if it's working ok, fine.