diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-13 17:08:37 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-01-13 17:08:37 -0200 |
| commit | e03767b3eb45059ef9a367161154bec407d78f35 (patch) | |
| tree | 5ebfd6e7536794dd1c5b1bc5edbbf5408f518843 | |
| parent | 8396027516c861c536e6604c7156cdf57e1dbc0d (diff) | |
| download | lua-e03767b3eb45059ef9a367161154bec407d78f35.tar.gz lua-e03767b3eb45059ef9a367161154bec407d78f35.tar.bz2 lua-e03767b3eb45059ef9a367161154bec407d78f35.zip | |
details (comments)
| -rw-r--r-- | lobject.c | 4 | ||||
| -rw-r--r-- | ltm.c | 10 |
2 files changed, 6 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.c,v 1.14 1998/12/27 20:25:20 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 1.15 1999/01/04 13:37:07 roberto Exp roberto $ |
| 3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -90,7 +90,7 @@ static double expten (unsigned int e) { | |||
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | double luaO_str2d (char *s) { | 93 | double luaO_str2d (char *s) { /* LUA_NUMBER */ |
| 94 | double a = 0.0; | 94 | double a = 0.0; |
| 95 | int point = 0; | 95 | int point = 0; |
| 96 | if (!isdigit((unsigned char)*s) && !isdigit((unsigned char)*(s+1))) | 96 | if (!isdigit((unsigned char)*s) && !isdigit((unsigned char)*(s+1))) |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.c,v 1.17 1998/08/21 17:43:44 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 1.18 1998/12/22 18:10: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 | */ |
| @@ -46,8 +46,7 @@ static char validevents[NUM_TAGS][IM_N] = { /* ORDER LUA_T, ORDER IM */ | |||
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | static int validevent (int t, int e) | 49 | static int validevent (int t, int e) { /* ORDER LUA_T */ |
| 50 | { /* ORDER LUA_T */ | ||
| 51 | return (t < LUA_T_NIL) ? 1 : validevents[-t][e]; | 50 | return (t < LUA_T_NIL) ? 1 : validevents[-t][e]; |
| 52 | } | 51 | } |
| 53 | 52 | ||
| @@ -157,10 +156,9 @@ void luaT_settagmethod (int t, char *event, TObject *func) | |||
| 157 | } | 156 | } |
| 158 | 157 | ||
| 159 | 158 | ||
| 160 | char *luaT_travtagmethods (int (*fn)(TObject *)) | 159 | char *luaT_travtagmethods (int (*fn)(TObject *)) { /* ORDER IM */ |
| 161 | { | ||
| 162 | int e; | 160 | int e; |
| 163 | for (e=IM_GETTABLE; e<=IM_FUNCTION; e++) { /* ORDER IM */ | 161 | for (e=IM_GETTABLE; e<=IM_FUNCTION; e++) { |
| 164 | int t; | 162 | int t; |
| 165 | for (t=0; t>=L->last_tag; t--) | 163 | for (t=0; t>=L->last_tag; t--) |
| 166 | if (fn(luaT_getim(t,e))) | 164 | if (fn(luaT_getim(t,e))) |
