[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A few Wild and Wooly Proposals, while we're here (was Re: Feature request: userdata slice)
- From: Philipp Janda <siffiejoe@...>
- Date: Fri, 21 Aug 2015 04:39:31 +0200
Am 21.08.2015 um 04:18 schröbte Sean Conner:
1) Allow unique metatables for lightuserdata, that also respect __gc.
lightuserdata is a value type. `__gc` doesn't work well with value types ...
lua_pushlightuserdata( L, 0x1234 );
luaL_getmetatable( L, "metatablewithgc" );
lua_setmetatable( L, -2 );
lua_pushvalue( L, -1 ); /* duplicate lightuserdata */
lua_pop( L, 2 );
/* should the __gc method really run twice now? */
-spc (I can't let Soni have all the fun here ... [5])
Philipp
- References:
- Re: Feature request: userdata slice, Philipp Janda
- Re: Feature request: userdata slice, 云风 Cloud Wu
- Re: Feature request: userdata slice, Dirk Laurie
- Re: Feature request: userdata slice, 云风 Cloud Wu
- Re: Feature request: userdata slice, Dirk Laurie
- Re: Feature request: userdata slice, Dirk Laurie
- Re: Feature request: userdata slice, Tim Hill
- Re: Feature request: userdata slice, William Ahern
- Re: Feature request: userdata slice, Roberto Ierusalimschy
- Re: Feature request: userdata slice, William Ahern
- A few Wild and Wooly Proposals, while we're here (was Re: Feature request: userdata slice), Sean Conner