summaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-06 16:49:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2015-03-06 16:49:50 -0300
commita30c66f0fc17bf733c2289a0d7a76930dac80f47 (patch)
tree96d7e5fff8245da7540d14818adc28f420036b26 /llimits.h
parentbb4baa73ea85c0fd49ab2ab96f0f174cd131830a (diff)
downloadlua-github-a30c66f0fc17bf733c2289a0d7a76930dac80f47.tar.gz
macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameter
(some people use it)
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/llimits.h b/llimits.h
index 7ff282ca..c711ca64 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
/*
-** $Id: llimits.h,v 1.132 2015/03/03 19:53:13 roberto Exp roberto $
+** $Id: llimits.h,v 1.133 2015/03/04 13:31:21 roberto Exp roberto $
** Limits, basic types, and some other 'installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -88,15 +88,11 @@ typedef LUAI_UACINT l_uacInt;
/*
** assertion for checking API calls
*/
-#if defined(LUA_USE_APICHECK)
-#include <assert.h>
-#define luai_apicheck(e) assert(e)
-#else
-#define luai_apicheck(e) lua_assert(e)
+#if !defined(luai_apicheck)
+#define luai_apicheck(l,e) lua_assert(e)
#endif
-
-#define api_check(e,msg) luai_apicheck((e) && msg)
+#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)
/* macro to avoid warnings about unused variables */