From 63b8a6fd2090985daba51d1f7bf019b15ee0ae30 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 3 Nov 1995 13:30:50 -0200 Subject: "getobjname" checks first fallbacks (so, if a function is global and a fallback, it is reported as a fallback). --- table.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/table.c b/table.c index 7f736d7a..c48662c7 100644 --- 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 */ @@ -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 ""; } -- cgit v1.2.3-55-g6feb