[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: C API question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Jan 2011 16:27:54 -0200
> Well, sure, but the whole point was to (a) avoid the registry, and
> (b) reduce the execution overhead. It is a simple pointer offset to
> convert from the userdata block address to the userdata object. A
> supported lua_pushuserdata (or something like that) would save lots
> complexity compared with using the registry, and avoid use of ad hoc
> undocumented mechanisms.
That would create a whole new world of possibilities for dangling
pointers. Lua has a strong principle of avoiding references that
are not accounted for by the garbage collector.
-- Roberto
- References:
- Re: C API question, joao lobato
- Re: C API question, Roberto Ierusalimschy
- Re: C API question, Mark Hamburg
- Re: C API question, Roberto Ierusalimschy
- Re: C API question, Jerome Vuarand
- Re: C API question, Roberto Ierusalimschy
- Re: C API question, Daniel Silverstone
- Re: C API question, Doug Currie
- Re: C API question, Patrick Donnelly
- Re: C API question, Doug Currie