char *lua_getobjname (lua_Object o, char **name) { /* try to find a name for given function */ set_normalized(L->stack.top, Address(o)); /* to be accessed by "checkfunc" */ if ((*name = luaS_travsymbol(checkfunc)) != NULL) return "global"; else if ((*name = luaT_travtagmethods(checkfunc)) != NULL) return "tag-method"; else return ""; }
const char *lua_getobjname (lua_Object o, const char **name) { // try to find a name for given function set_normalized(lua_state->stack.top, Address(o)); // to be accessed by "checkfunc *name = luaT_travtagmethods(checkfunc); if (*name) return "tag-method"; *name = luaS_travsymbol(checkfunc); if (*name) return "global"; else return ""; }