diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-06 16:49:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-03-06 16:49:50 -0300 |
commit | a30c66f0fc17bf733c2289a0d7a76930dac80f47 (patch) | |
tree | 96d7e5fff8245da7540d14818adc28f420036b26 /llimits.h | |
parent | bb4baa73ea85c0fd49ab2ab96f0f174cd131830a (diff) | |
download | lua-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.h | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -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 */ |