> And while I'm at it, what's is the use case of luaL_ref and luaL_unref > after all? That is a good question. Since userdata got "environments" in 5.1 (called uservalues, in 5.2), the need for luaL_ref diminished a lot. -- Roberto