aboutsummaryrefslogtreecommitdiff
path: root/llimits.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-02 12:57:25 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-07-02 12:57:25 -0300
commit5017cc6ba299c317ca4904c6a464fd67ef1eec36 (patch)
tree9f846603045dfe1fbb5c52d45c58455906b27df4 /llimits.h
parent2f125ebc33bb61938dbdb37bee13013b988062b8 (diff)
downloadlua-5017cc6ba299c317ca4904c6a464fd67ef1eec36.tar.gz
lua-5017cc6ba299c317ca4904c6a464fd67ef1eec36.tar.bz2
lua-5017cc6ba299c317ca4904c6a464fd67ef1eec36.zip
simpler 'luai_apicheck' (and avoids compilation error...)
Diffstat (limited to 'llimits.h')
-rw-r--r--llimits.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/llimits.h b/llimits.h
index a5d18957..9b9547b5 100644
--- a/llimits.h
+++ b/llimits.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llimits.h,v 1.88 2011/02/28 17:32:10 roberto Exp roberto $ 2** $Id: llimits.h,v 1.89 2011/05/05 19:43:14 roberto Exp roberto $
3** Limits, basic types, and some other `installation-dependent' definitions 3** Limits, basic types, and some other `installation-dependent' definitions
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -70,13 +70,17 @@ typedef LUAI_UACNUMBER l_uacNumber;
70/* 70/*
71** assertion for checking API calls 71** assertion for checking API calls
72*/ 72*/
73#if !defined(luai_apicheck)
74
73#if defined(LUA_USE_APICHECK) 75#if defined(LUA_USE_APICHECK)
74#include <assert.h> 76#include <assert.h>
75#define luai_apicheck(L,e) { (void)L; assert(e); } 77#define luai_apicheck(L,e) assert(e)
76#elif !defined(luai_apicheck) 78#else
77#define luai_apicheck(L,e) lua_assert(e) 79#define luai_apicheck(L,e) lua_assert(e)
78#endif 80#endif
79 81
82#endif
83
80#define api_check(l,e,msg) luai_apicheck(l,(e) && msg) 84#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)
81 85
82 86