diff options
Diffstat (limited to '')
| -rw-r--r-- | lobject.h | 6 | ||||
| -rw-r--r-- | lua.c | 8 |
2 files changed, 7 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lobject.h,v 1.110 2001/08/27 15:16:28 roberto Exp $ | 2 | ** $Id: lobject.h,v 1.112 2001/09/07 17:39:10 roberto Exp $ |
| 3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -178,8 +178,8 @@ typedef struct UpVal { | |||
| 178 | ** Closures | 178 | ** Closures |
| 179 | */ | 179 | */ |
| 180 | typedef struct Closure { | 180 | typedef struct Closure { |
| 181 | int isC; /* 0 for Lua functions, 1 for C functions */ | 181 | short isC; /* 0 for Lua functions, 1 for C functions */ |
| 182 | int nupvalues; | 182 | short nupvalues; |
| 183 | struct Closure *next; | 183 | struct Closure *next; |
| 184 | struct Closure *mark; /* marked closures (point to itself when not marked) */ | 184 | struct Closure *mark; /* marked closures (point to itself when not marked) */ |
| 185 | union { | 185 | union { |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.68 2001/06/11 14:57:17 roberto Exp $ | 2 | ** $Id: lua.c,v 1.69 2001/08/30 20:54:02 roberto Exp $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -196,7 +196,7 @@ static void manual_input (int version, int prompt) { | |||
| 196 | } | 196 | } |
| 197 | if (firstline && buffer[0] == l_c('=')) { | 197 | if (firstline && buffer[0] == l_c('=')) { |
| 198 | buffer[0] = l_c(' '); | 198 | buffer[0] = l_c(' '); |
| 199 | lua_pushstring(L, l_s("return ")); | 199 | lua_pushstring(L, l_s("return")); |
| 200 | toprint = 1; | 200 | toprint = 1; |
| 201 | } | 201 | } |
| 202 | l = strlen(buffer); | 202 | l = strlen(buffer); |
| @@ -212,8 +212,8 @@ static void manual_input (int version, int prompt) { | |||
| 212 | } | 212 | } |
| 213 | lua_concat(L, lua_gettop(L)); | 213 | lua_concat(L, lua_gettop(L)); |
| 214 | ldo(lua_dostring, lua_tostring(L, 1), 0); | 214 | ldo(lua_dostring, lua_tostring(L, 1), 0); |
| 215 | if (toprint) { | 215 | lua_remove(L, 1); /* remove ran string */ |
| 216 | lua_remove(L, 1); /* remove ran string */ | 216 | if (toprint && lua_gettop(L) > 0) { /* any result to print? */ |
| 217 | lua_getglobal(L, l_s("print")); | 217 | lua_getglobal(L, l_s("print")); |
| 218 | lua_insert(L, 1); | 218 | lua_insert(L, 1); |
| 219 | lua_call(L, lua_gettop(L)-1, 0); | 219 | lua_call(L, lua_gettop(L)-1, 0); |
