diff options
author | dartraiden <wowemuh@gmail.com> | 2021-04-03 15:33:54 +0300 |
---|---|---|
committer | dartraiden <wowemuh@gmail.com> | 2021-04-03 15:33:54 +0300 |
commit | 875bc74fa5fe083ba0b5c5a785c53ec0f49b9a1b (patch) | |
tree | 8c025467c2f85d9a9b7bb2fdd644cee4a9996d7f /libs/liblua/src/lauxlib.h | |
parent | a0970c309b5c9cb655f58ef3c5154296e975580e (diff) |
liblua: update to 5.4.3
Diffstat (limited to 'libs/liblua/src/lauxlib.h')
-rw-r--r-- | libs/liblua/src/lauxlib.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libs/liblua/src/lauxlib.h b/libs/liblua/src/lauxlib.h index 59fef6af13..72f70e7d9d 100644 --- a/libs/liblua/src/lauxlib.h +++ b/libs/liblua/src/lauxlib.h @@ -12,6 +12,7 @@ #include <stddef.h> #include <stdio.h> +#include "luaconf.h" #include "lua.h" @@ -130,10 +131,10 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, (luaL_checkversion(L), luaL_newlibtable(L,l), luaL_setfuncs(L,l,0)) #define luaL_argcheck(L, cond,arg,extramsg) \ - ((void)((cond) || luaL_argerror(L, (arg), (extramsg)))) + ((void)(luai_likely(cond) || luaL_argerror(L, (arg), (extramsg)))) #define luaL_argexpected(L,cond,arg,tname) \ - ((void)((cond) || luaL_typeerror(L, (arg), (tname)))) + ((void)(luai_likely(cond) || luaL_typeerror(L, (arg), (tname)))) #define luaL_checkstring(L,n) (luaL_checklstring(L, (n), NULL)) #define luaL_optstring(L,n,d) (luaL_optlstring(L, (n), (d), NULL)) @@ -158,6 +159,22 @@ LUALIB_API void (luaL_requiref) (lua_State *L, const char *modname, /* +** Internal assertions for in-house debugging +*/ +#if !defined(lua_assert) + +#if defined LUAI_ASSERT + #include <assert.h> + #define lua_assert(c) assert(c) +#else + #define lua_assert(c) ((void)0) +#endif + +#endif + + + +/* ** {====================================================== ** Generic Buffer manipulation ** ======================================================= |