diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-18 13:57:03 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-18 13:57:03 -0300 |
commit | c9902be294f5c2dca8a67a67fd324f91e4352c0a (patch) | |
tree | 3f3ef43d231334ee60c13bf310f7995845e97cab /ltm.c | |
parent | 112c9d53ab47e77fd09d4ecb9b11d432ed906c88 (diff) | |
download | lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.tar.gz lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.tar.bz2 lua-c9902be294f5c2dca8a67a67fd324f91e4352c0a.zip |
"findname" moved from lobject.c to lauxlib.c (so libraries may use it).
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 1.14 1998/03/09 21:49:52 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.15 1998/03/11 13:59:50 roberto Exp roberto $ |
3 | ** Tag methods | 3 | ** Tag methods |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -24,7 +24,7 @@ char *luaT_eventname[] = { /* ORDER IM */ | |||
24 | 24 | ||
25 | static int luaI_checkevent (char *name, char *list[]) | 25 | static int luaI_checkevent (char *name, char *list[]) |
26 | { | 26 | { |
27 | int e = luaO_findstring(name, list); | 27 | int e = luaL_findstring(name, list); |
28 | if (e < 0) | 28 | if (e < 0) |
29 | luaL_verror("`%.50s' is not a valid event name", name); | 29 | luaL_verror("`%.50s' is not a valid event name", name); |
30 | return e; | 30 | return e; |
@@ -214,7 +214,7 @@ void luaT_setfallback (void) | |||
214 | char *name = luaL_check_string(1); | 214 | char *name = luaL_check_string(1); |
215 | lua_Object func = lua_getparam(2); | 215 | lua_Object func = lua_getparam(2); |
216 | luaL_arg_check(lua_isfunction(func), 2, "function expected"); | 216 | luaL_arg_check(lua_isfunction(func), 2, "function expected"); |
217 | switch (luaO_findstring(name, oldnames)) { | 217 | switch (luaL_findstring(name, oldnames)) { |
218 | case 0: /* old error fallback */ | 218 | case 0: /* old error fallback */ |
219 | oldfunc = L->errorim; | 219 | oldfunc = L->errorim; |
220 | L->errorim = *luaA_Address(func); | 220 | L->errorim = *luaA_Address(func); |
@@ -243,7 +243,7 @@ void luaT_setfallback (void) | |||
243 | } | 243 | } |
244 | default: { | 244 | default: { |
245 | int e; | 245 | int e; |
246 | if ((e = luaO_findstring(name, luaT_eventname)) >= 0) { | 246 | if ((e = luaL_findstring(name, luaT_eventname)) >= 0) { |
247 | oldfunc = *luaT_getim(LUA_T_NIL, e); | 247 | oldfunc = *luaT_getim(LUA_T_NIL, e); |
248 | fillvalids(e, luaA_Address(func)); | 248 | fillvalids(e, luaA_Address(func)); |
249 | replace = (e == IM_GC || e == IM_INDEX) ? nilFB : typeFB; | 249 | replace = (e == IM_GC || e == IM_INDEX) ? nilFB : typeFB; |