mirror of
https://github.com/lua/lua
synced 2025-01-11 20:09:17 +03:00
do not use compatibility macros in Lua
This commit is contained in:
parent
6b8725b0ee
commit
f9dec5fc84
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lbaselib.c,v 1.206 2008/02/25 14:33:57 roberto Exp roberto $
|
** $Id: lbaselib.c,v 1.207 2008/07/03 14:23:35 roberto Exp roberto $
|
||||||
** Basic library
|
** Basic library
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -183,7 +183,7 @@ static int luaB_rawset (lua_State *L) {
|
|||||||
|
|
||||||
|
|
||||||
static int luaB_gcinfo (lua_State *L) {
|
static int luaB_gcinfo (lua_State *L) {
|
||||||
lua_pushinteger(L, lua_getgccount(L));
|
lua_pushinteger(L, lua_gc(L, LUA_GCCOUNT, 0));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
ltests.h
4
ltests.h
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: ltests.h,v 2.20 2007/11/12 16:28:45 roberto Exp roberto $
|
** $Id: ltests.h,v 2.21 2008/06/23 16:50:34 roberto Exp roberto $
|
||||||
** Internal Header for Debugging of the Lua Implementation
|
** Internal Header for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
/* do not use compatibility macros in Lua code */
|
||||||
|
#undef LUA_COMPAT
|
||||||
|
|
||||||
#define LUA_DEBUG
|
#define LUA_DEBUG
|
||||||
|
|
||||||
|
4
lua.c
4
lua.c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
** $Id: lua.c,v 1.169 2008/06/26 19:40:12 roberto Exp roberto $
|
** $Id: lua.c,v 1.170 2008/06/26 19:47:51 roberto Exp roberto $
|
||||||
** Lua stand-alone interpreter
|
** Lua stand-alone interpreter
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
@ -373,7 +373,7 @@ static int pmain (lua_State *L) {
|
|||||||
int main (int argc, char **argv) {
|
int main (int argc, char **argv) {
|
||||||
int status;
|
int status;
|
||||||
struct Smain s;
|
struct Smain s;
|
||||||
lua_State *L = lua_open(); /* create state */
|
lua_State *L = luaL_newstate(); /* create state */
|
||||||
if (L == NULL) {
|
if (L == NULL) {
|
||||||
l_message(argv[0], "cannot create state: not enough memory");
|
l_message(argv[0], "cannot create state: not enough memory");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user