lua-users home
lua-l archive

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


I've done pretty much the same thing as Ando, except that I added accessor functions to the API to prevent the base library from needing access to the lua_State internals.
-jaz

-----Original Message-----
From: Luiz Henrique de Figueiredo [mailto:lhf@tecgraf.puc-rio.br]
Sent: August 1, 2003 5:22 PM
To: lua@bazar2.conectiva.com.br
Subject: Re: Sanity check..


>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.
--lhf