[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: full userdata guaranteed to not move?
- From: Josh Haberman <jhaberman@...>
- Date: Sat, 15 Feb 2014 14:54:51 -0800
I asked a question a while back about Lua strings and whether the API
guarantees that their address will remain fixed.
The consensus was that the API only guarantees that strings stay put
while they're on the stack; at any other time a moving GC is allowed
to relocate them (even though no implementation does this currently).
Now I'm wondering the same thing about full userdata. Unlike
lua_tolstring(), lua_touserdata() contains no warning about pointers
becoming invalid when the userdata is removed from the stack.
Does this mean that userdata are not allowed to be moved, even by a
theoretical future moving GC?