mirror of
https://github.com/lua/lua
synced 2025-04-07 13:32:57 +03:00
lua_assert is an internal matter, not to be configured
This commit is contained in:
parent
6a516878e9
commit
0fd6466957
19
llimits.h
19
llimits.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: llimits.h,v 1.67 2005/08/24 16:15:49 roberto Exp roberto $
|
||||
** $Id: llimits.h,v 1.68 2005/12/22 16:19:56 roberto Exp roberto $
|
||||
** Limits, basic types, and some other `installation-dependent' definitions
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -15,9 +15,6 @@
|
||||
#include "lua.h"
|
||||
|
||||
|
||||
#define api_check luai_apicheck
|
||||
|
||||
|
||||
typedef LUAI_UINT32 lu_int32;
|
||||
|
||||
typedef LUAI_UMEM lu_mem;
|
||||
@ -54,7 +51,19 @@ typedef LUAI_USER_ALIGNMENT_T L_Umaxalign;
|
||||
typedef LUAI_UACNUMBER l_uacNumber;
|
||||
|
||||
|
||||
#define check_exp(c,e) (lua_assert(c), (e))
|
||||
/* internal assertions for in-house debugging */
|
||||
#ifdef lua_assert
|
||||
|
||||
#define check_exp(c,e) (lua_assert(c), (e))
|
||||
#define api_check(l,e) lua_assert(e)
|
||||
|
||||
#else
|
||||
|
||||
#define lua_assert(c) ((void)0)
|
||||
#define check_exp(c,e) (e)
|
||||
#define api_check luai_apicheck
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef UNUSED
|
||||
|
3
ltests.h
3
ltests.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ltests.h,v 2.15 2005/06/06 13:30:25 roberto Exp roberto $
|
||||
** $Id: ltests.h,v 2.16 2005/09/14 17:48:57 roberto Exp roberto $
|
||||
** Internal Header for Debugging of the Lua Implementation
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -15,7 +15,6 @@
|
||||
|
||||
#undef NDEBUG
|
||||
#include <assert.h>
|
||||
#undef lua_assert
|
||||
#define lua_assert(c) assert(c)
|
||||
|
||||
|
||||
|
12
luaconf.h
12
luaconf.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: luaconf.h,v 1.75 2005/11/25 13:29:11 roberto Exp roberto $
|
||||
** $Id: luaconf.h,v 1.76 2005/12/15 18:53:34 roberto Exp roberto $
|
||||
** Configuration file for Lua
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -182,13 +182,6 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ lua_assert describes the internal assertions in Lua.
|
||||
** CHANGE that only if you need to debug Lua.
|
||||
*/
|
||||
#define lua_assert(c) ((void)0)
|
||||
|
||||
|
||||
/*
|
||||
@@ LUA_QL describes how error messages quote program elements.
|
||||
** CHANGE it if you want a different appearance.
|
||||
@ -373,8 +366,7 @@
|
||||
#include <assert.h>
|
||||
#define luai_apicheck(L,o) { (void)L; assert(o); }
|
||||
#else
|
||||
/* (By default lua_assert is empty, so luai_apicheck is also empty.) */
|
||||
#define luai_apicheck(L,o) { (void)L; lua_assert(o); }
|
||||
#define luai_apicheck(L,o) { (void)L; }
|
||||
#endif
|
||||
|
||||
|
||||
|
8
lualib.h
8
lualib.h
@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: lualib.h,v 1.34 2005/04/13 17:24:20 roberto Exp roberto $
|
||||
** $Id: lualib.h,v 1.35 2005/08/10 18:06:58 roberto Exp roberto $
|
||||
** Lua standard libraries
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -44,4 +44,10 @@ LUALIB_API int (luaopen_package) (lua_State *L);
|
||||
LUALIB_API void (luaL_openlibs) (lua_State *L);
|
||||
|
||||
|
||||
|
||||
#ifndef lua_assert
|
||||
#define lua_assert(x) ((void)0)
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user