[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: LUAI_EXTRASPACE and luai_userstateopen
- From: "Erik Cassel" <erik@...>
- Date: Mon, 8 Mar 2010 09:50:46 -0800
> Still I hope, that the LUAI_EXTRASPACE and luai_userstateopen mechanism or
> something aquivalent will be in the final Lua 5.2.
I strongly agree. We rely heavily on this feature for efficient
extensibility of Lua.
I estimate our company runs 20,000 hours of Lua per day. Doing a map lookup
every time we need to access per-thread data would add a lot of computation
[mailto:email@example.com] On Behalf Of Oliver Schmidt
Sent: Saturday, March 06, 2010 5:29 AM
To: Lua list
Subject: Re: LUAI_EXTRASPACE and luai_userstateopen
On Saturday 06 March 2010, M Joonas Pihlaja wrote:
> I'm sorry I can't remember the specific patch I was having an issue
> with, but I do remember vividly fixing merge conflicts with one of my
> own patches which used the extra space and another patch which also
> used the same mechanism. It ended up being easier for me to rework my
> own patch to directly embed the extra data it needed into the
> lua_State and reference it by name, than to try and sort out the
> ickyness of two extensions trying to use the same space at the same
> time. The merge tool was happier too.
Ah ok, now I understand. But it's not only the data (that can be put before
within the lua_State), there might be also some action within
luai_userstateopen, luai_userstatethread, ... How would you handle this, if
these macros are going to be removed in Lua 5.2?
Still I hope, that the LUAI_EXTRASPACE and luai_userstateopen mechanism or
something aquivalent will be in the final Lua 5.2.
It can be such a useful feature. It is also clear that two different patches
to luaconf.h might cause some problems, but IMHO this cannot be the reason
remove the possibility to easily extend the lua_State in luaconf.h.