"getobjname" checks first fallbacks (so, if a function is global and
a fallback, it is reported as a fallback).
This commit is contained in:
8
table.c
8
table.c
@@ -3,7 +3,7 @@
|
|||||||
** Module to control static tables
|
** Module to control static tables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_table="$Id: table.c,v 2.36 1995/10/23 13:53:48 roberto Exp roberto $";
|
char *rcs_table="$Id: table.c,v 2.37 1995/10/26 14:21:56 roberto Exp roberto $";
|
||||||
|
|
||||||
/*#include <string.h>*/
|
/*#include <string.h>*/
|
||||||
|
|
||||||
@@ -273,10 +273,10 @@ static int checkfunc (Object *o)
|
|||||||
char *getobjname (lua_Object o, char **name)
|
char *getobjname (lua_Object o, char **name)
|
||||||
{ /* try to find a name for given function */
|
{ /* try to find a name for given function */
|
||||||
functofind = luaI_Address(o);
|
functofind = luaI_Address(o);
|
||||||
if ((*name = lua_travsymbol(checkfunc)) != NULL)
|
if ((*name = luaI_travfallbacks(checkfunc)) != NULL)
|
||||||
return "global";
|
|
||||||
else if ((*name = luaI_travfallbacks(checkfunc)) != NULL)
|
|
||||||
return "fallback";
|
return "fallback";
|
||||||
|
else if ((*name = lua_travsymbol(checkfunc)) != NULL)
|
||||||
|
return "global";
|
||||||
else return "";
|
else return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user