mirror of https://github.com/rusefi/lua.git
macro DEBUG renamed to LUA_DEBUG
This commit is contained in:
parent
e42a219eeb
commit
37e9c2e744
4
lmem.c
4
lmem.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lmem.c,v 1.37 2000/10/11 16:47:50 roberto Exp roberto $
|
** $Id: lmem.c,v 1.38 2000/10/26 12:47:05 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
/*
|
/*
|
||||||
** {======================================================================
|
** {======================================================================
|
||||||
** Controlled version for realloc.
|
** Controlled version for realloc.
|
||||||
|
|
4
lmem.h
4
lmem.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lmem.h,v 1.14 2000/05/24 13:54:49 roberto Exp roberto $
|
** $Id: lmem.h,v 1.15 2000/08/07 18:39:16 roberto Exp roberto $
|
||||||
** Interface to Memory Manager
|
** Interface to Memory Manager
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ void *luaM_growaux (lua_State *L, void *block, size_t nelems,
|
||||||
((v)=(t *)luaM_realloc(L, v,(n)*(lint32)sizeof(t)))
|
((v)=(t *)luaM_realloc(L, v,(n)*(lint32)sizeof(t)))
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
extern unsigned long memdebug_numblocks;
|
extern unsigned long memdebug_numblocks;
|
||||||
extern unsigned long memdebug_total;
|
extern unsigned long memdebug_total;
|
||||||
extern unsigned long memdebug_maxmem;
|
extern unsigned long memdebug_maxmem;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lobject.h,v 1.79 2000/10/05 12:14:08 roberto Exp roberto $
|
** $Id: lobject.h,v 1.80 2000/10/26 12:47:05 roberto Exp roberto $
|
||||||
** Type definitions for Lua objects
|
** Type definitions for Lua objects
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#define LUA_INTERNALERROR(s) assert(((void)s,0))
|
#define LUA_INTERNALERROR(s) assert(((void)s,0))
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
/* to avoid warnings, and make sure value is really unused */
|
/* to avoid warnings, and make sure value is really unused */
|
||||||
#define UNUSED(x) (x=0, (void)(x))
|
#define UNUSED(x) (x=0, (void)(x))
|
||||||
#else
|
#else
|
||||||
|
|
6
lstate.c
6
lstate.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: lstate.c,v 1.46 2000/10/24 19:12:06 roberto Exp roberto $
|
** $Id: lstate.c,v 1.47 2000/10/26 12:47:05 roberto Exp roberto $
|
||||||
** Global State
|
** Global State
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
#include "ltm.h"
|
#include "ltm.h"
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
static lua_State *lua_state = NULL;
|
static lua_State *lua_state = NULL;
|
||||||
void luaB_opentests (lua_State *L);
|
void luaB_opentests (lua_State *L);
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,7 +55,7 @@ static void f_luaopen (lua_State *L, void *ud) {
|
||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
lua_ref(L, 1); /* create registry */
|
lua_ref(L, 1); /* create registry */
|
||||||
lua_register(L, LUA_ERRORMESSAGE, errormessage);
|
lua_register(L, LUA_ERRORMESSAGE, errormessage);
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
luaB_opentests(L);
|
luaB_opentests(L);
|
||||||
if (lua_state == NULL) lua_state = L; /* keep first state to be opened */
|
if (lua_state == NULL) lua_state = L; /* keep first state to be opened */
|
||||||
#endif
|
#endif
|
||||||
|
|
6
ltests.c
6
ltests.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
** $Id: ltests.c,v 1.51 2000/10/20 16:39:03 roberto Exp roberto $
|
** $Id: ltests.c,v 1.52 2000/10/26 12:47:05 roberto Exp roberto $
|
||||||
** Internal Module for Debugging of the Lua Implementation
|
** Internal Module for Debugging of the Lua Implementation
|
||||||
** See Copyright Notice in lua.h
|
** See Copyright Notice in lua.h
|
||||||
*/
|
*/
|
||||||
|
@ -32,9 +32,9 @@ void luaB_opentests (lua_State *L);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The whole module only makes sense with DEBUG on
|
** The whole module only makes sense with LUA_DEBUG on
|
||||||
*/
|
*/
|
||||||
#ifdef DEBUG
|
#ifdef LUA_DEBUG
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue