commit 5017cc6ba299c317ca4904c6a464fd67ef1eec36
parent 2f125ebc33bb61938dbdb37bee13013b988062b8
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Sat, 2 Jul 2011 12:57:01 -0300
simpler 'luai_apicheck' (and avoids compilation error...)
Diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/llimits.h b/llimits.h
@@ -1,5 +1,5 @@
/*
-** $Id: llimits.h,v 1.88 2011/02/28 17:32:10 roberto Exp roberto $
+** $Id: llimits.h,v 1.89 2011/05/05 19:43:14 roberto Exp roberto $
** Limits, basic types, and some other `installation-dependent' definitions
** See Copyright Notice in lua.h
*/
@@ -70,13 +70,17 @@ typedef LUAI_UACNUMBER l_uacNumber;
/*
** assertion for checking API calls
*/
+#if !defined(luai_apicheck)
+
#if defined(LUA_USE_APICHECK)
#include <assert.h>
-#define luai_apicheck(L,e) { (void)L; assert(e); }
-#elif !defined(luai_apicheck)
+#define luai_apicheck(L,e) assert(e)
+#else
#define luai_apicheck(L,e) lua_assert(e)
#endif
+#endif
+
#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)