Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A registry object in Lua is an integer in C, and you can pass it around as much as you want. However, you have to be careful, because it can be eliminated by the GC, in much the same way as a PyObject pointer.

The registry object really is just an address. It's the equivalent of: lua_State->top+LUA_REGISTRYINDEX[reference] in C.

There's no functional difference to a PyObject pointer.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: