aboutsummaryrefslogtreecommitdiff
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-a30c66f0fc17bf733c2289a0d7a76930dac80f47.tar.gz
lua-a30c66f0fc17bf733c2289a0d7a76930dac80f47.tar.bz2
lua-a30c66f0fc17bf733c2289a0d7a76930dac80f47.zip
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 @@
1/* 1/*
2** $Id: llimits.h,v 1.132 2015/03/03 19:53:13 roberto Exp roberto $ 2** $Id: llimits.h,v 1.133 2015/03/04 13:31:21 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*/
@@ -88,15 +88,11 @@ typedef LUAI_UACINT l_uacInt;
88/* 88/*
89** assertion for checking API calls 89** assertion for checking API calls
90*/ 90*/
91#if defined(LUA_USE_APICHECK) 91#if !defined(luai_apicheck)
92#include <assert.h> 92#define luai_apicheck(l,e) lua_assert(e)
93#define luai_apicheck(e) assert(e)
94#else
95#define luai_apicheck(e) lua_assert(e)
96#endif 93#endif
97 94
98 95#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)
99#define api_check(e,msg) luai_apicheck((e) && msg)
100 96
101 97
102/* macro to avoid warnings about unused variables */ 98/* macro to avoid warnings about unused variables */