aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lbaselib.c4
-rw-r--r--ltests.h4
-rw-r--r--lua.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/lbaselib.c b/lbaselib.c
index c2ff76f3..4c855975 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -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
185static int luaB_gcinfo (lua_State *L) { 185static 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
diff --git a/ltests.h b/ltests.h
index 161c1969..8a6f2ba9 100644
--- a/ltests.h
+++ b/ltests.h
@@ -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
diff --git a/lua.c b/lua.c
index 26453412..e8dbe1be 100644
--- a/lua.c
+++ b/lua.c
@@ -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) {
373int main (int argc, char **argv) { 373int 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;