mirror of
https://github.com/lua/lua
synced 2024-11-22 04:41:23 +03:00
'lua_assert' moved from 'lualib.h' to 'lauxlib.h'
The macro is useful also in 'lauxlib.c', which does not include 'lualib.h'. Also, the definition was corrected to be "on" when LUAI_ASSERT is defined.
This commit is contained in:
parent
d9d2904f09
commit
d41c36bf67
12
lauxlib.h
12
lauxlib.h
@ -157,6 +157,18 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname,
|
||||
#define luaL_pushfail(L) lua_pushnil(L)
|
||||
|
||||
|
||||
/*
|
||||
** Internal assertions for in-house debugging
|
||||
*/
|
||||
#if defined LUAI_ASSERT
|
||||
#include <assert.h>
|
||||
#define lua_assert(c) assert(c)
|
||||
#else
|
||||
#define lua_assert(x) ((void)0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** {======================================================
|
||||
** Generic Buffer manipulation
|
||||
|
Loading…
Reference in New Issue
Block a user