mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
"getobjname" checks first fallbacks (so, if a function is global and
a fallback, it is reported as a fallback).
This commit is contained in:
parent
024f2374ab
commit
63b8a6fd20
1 changed files with 4 additions and 4 deletions
8
table.c
8
table.c
|
|
@ -3,7 +3,7 @@
|
|||
** 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>*/
|
||||
|
||||
|
|
@ -273,10 +273,10 @@ static int checkfunc (Object *o)
|
|||
char *getobjname (lua_Object o, char **name)
|
||||
{ /* try to find a name for given function */
|
||||
functofind = luaI_Address(o);
|
||||
if ((*name = lua_travsymbol(checkfunc)) != NULL)
|
||||
return "global";
|
||||
else if ((*name = luaI_travfallbacks(checkfunc)) != NULL)
|
||||
if ((*name = luaI_travfallbacks(checkfunc)) != NULL)
|
||||
return "fallback";
|
||||
else if ((*name = lua_travsymbol(checkfunc)) != NULL)
|
||||
return "global";
|
||||
else return "";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue