lua-users home
lua-l archive

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

Any reason not to enable this by default (for backwards


> -----Original Message-----
> From:
> []On Behalf Of Luiz Henrique de
> Figueiredo
> Sent: Monday, September 10, 2001 3:23 PM
> To: Multiple recipients of list
> Subject: RE: Parsing to byte code
> >The only downside now to this approach is the code
> >pushing user data becomes more complex in EVERY part of the application,
> >if you don't want memory allocated every time.
> Then define lua_pushuserdata to use the registry to store the Lua values
> created by lua_newuserdatabox, using the C pointer as an index.
> When the pointer
> exists in the registry (or any other table), simply return the value.
> Since lua_pushuserdata is no longer part of the API, you can simply add a
> function lua_pushuserdata that does the above and not change the
> code at all.
> --lhf