[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: API reference question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 25 Mar 2004 10:13:27 -0300
> Is it correct to say for these functions returning C pointers:
> ...
> that "the returned pointer is valid while the element remains in the
> stack, after that it could become invalid due to garbage collection."?
Yes. (Well, the results from lua_topointer should never be dereferenced,
so they are never actually "valid".)
> (Idle question: is there a reason why luaopen_base() returns 0 while
> luaopen_table() and the other similar luaopen_...() return 1?)
The others return the created table. Baselib does not create a table
for its elements (well, forget about "coroutine"...)
-- Roberto