-
- lua_getregistry(st);
- lua_pushfstring(st, "luaextl_%s_%s_upvalue",
- data->cls, spec->name);
- lua_pushvalue(st, -1);
- lua_gettable(st, -3); /* Get registry.luaextl_fn_upvalue */
- spec2=lua_touserdata(st, -1);
-
- if(spec2==NULL)
- return FALSE;
-
- spec2->ispec=NULL;
- spec2->ospec=NULL;
- spec2->fn=NULL;
- spec2->name=NULL;
- spec2->l2handler=NULL;
-
- lua_pop(st, 1); /* Pop the upvalue */
- lua_pushnil(st);
- lua_rawset_check(st, -3); /* Clear registry.luaextl_fn_upvalue */