commit 63b8a6fd2090985daba51d1f7bf019b15ee0ae30
parent 024f2374abf963a9cf130286fd406fc03323558b
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 3 Nov 1995 13:30:31 -0200
"getobjname" checks first fallbacks (so, if a function is global and
a fallback, it is reported as a fallback).
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/table.c b/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 "";
}