diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-11-03 13:30:50 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-11-03 13:30:50 -0200 |
| commit | 63b8a6fd2090985daba51d1f7bf019b15ee0ae30 (patch) | |
| tree | 5c212f37e82e428dc3562e516ec68c528dbdb818 /table.c | |
| parent | 024f2374abf963a9cf130286fd406fc03323558b (diff) | |
| download | lua-63b8a6fd2090985daba51d1f7bf019b15ee0ae30.tar.gz lua-63b8a6fd2090985daba51d1f7bf019b15ee0ae30.tar.bz2 lua-63b8a6fd2090985daba51d1f7bf019b15ee0ae30.zip | |
"getobjname" checks first fallbacks (so, if a function is global and
a fallback, it is reported as a fallback).
Diffstat (limited to '')
| -rw-r--r-- | table.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** Module to control static tables | 3 | ** Module to control static tables |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_table="$Id: table.c,v 2.36 1995/10/23 13:53:48 roberto Exp roberto $"; | 6 | char *rcs_table="$Id: table.c,v 2.37 1995/10/26 14:21:56 roberto Exp roberto $"; |
| 7 | 7 | ||
| 8 | /*#include <string.h>*/ | 8 | /*#include <string.h>*/ |
| 9 | 9 | ||
| @@ -273,10 +273,10 @@ static int checkfunc (Object *o) | |||
| 273 | char *getobjname (lua_Object o, char **name) | 273 | char *getobjname (lua_Object o, char **name) |
| 274 | { /* try to find a name for given function */ | 274 | { /* try to find a name for given function */ |
| 275 | functofind = luaI_Address(o); | 275 | functofind = luaI_Address(o); |
| 276 | if ((*name = lua_travsymbol(checkfunc)) != NULL) | 276 | if ((*name = luaI_travfallbacks(checkfunc)) != NULL) |
| 277 | return "global"; | ||
| 278 | else if ((*name = luaI_travfallbacks(checkfunc)) != NULL) | ||
| 279 | return "fallback"; | 277 | return "fallback"; |
| 278 | else if ((*name = lua_travsymbol(checkfunc)) != NULL) | ||
| 279 | return "global"; | ||
| 280 | else return ""; | 280 | else return ""; |
| 281 | } | 281 | } |
| 282 | 282 | ||
