diff options
-rw-r--r-- | lbaselib.c | 4 | ||||
-rw-r--r-- | ltests.h | 4 | ||||
-rw-r--r-- | lua.c | 4 |
3 files changed, 7 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.206 2008/02/25 14:33:57 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.207 2008/07/03 14:23:35 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -183,7 +183,7 @@ static int luaB_rawset (lua_State *L) { | |||
183 | 183 | ||
184 | 184 | ||
185 | static int luaB_gcinfo (lua_State *L) { | 185 | static int luaB_gcinfo (lua_State *L) { |
186 | lua_pushinteger(L, lua_getgccount(L)); | 186 | lua_pushinteger(L, lua_gc(L, LUA_GCCOUNT, 0)); |
187 | return 1; | 187 | return 1; |
188 | } | 188 | } |
189 | 189 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.h,v 2.20 2007/11/12 16:28:45 roberto Exp roberto $ | 2 | ** $Id: ltests.h,v 2.21 2008/06/23 16:50:34 roberto Exp roberto $ |
3 | ** Internal Header for Debugging of the Lua Implementation | 3 | ** Internal Header for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -10,6 +10,8 @@ | |||
10 | 10 | ||
11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
12 | 12 | ||
13 | /* do not use compatibility macros in Lua code */ | ||
14 | #undef LUA_COMPAT | ||
13 | 15 | ||
14 | #define LUA_DEBUG | 16 | #define LUA_DEBUG |
15 | 17 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lua.c,v 1.169 2008/06/26 19:40:12 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.170 2008/06/26 19:47:51 roberto Exp roberto $ |
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 | */ |
@@ -373,7 +373,7 @@ static int pmain (lua_State *L) { | |||
373 | int main (int argc, char **argv) { | 373 | int main (int argc, char **argv) { |
374 | int status; | 374 | int status; |
375 | struct Smain s; | 375 | struct Smain s; |
376 | lua_State *L = lua_open(); /* create state */ | 376 | lua_State *L = luaL_newstate(); /* create state */ |
377 | if (L == NULL) { | 377 | if (L == NULL) { |
378 | l_message(argv[0], "cannot create state: not enough memory"); | 378 | l_message(argv[0], "cannot create state: not enough memory"); |
379 | return EXIT_FAILURE; | 379 | return EXIT_FAILURE; |