simpler 'luai_apicheck' (and avoids compilation error...)

This commit is contained in:
Roberto Ierusalimschy
2011-07-02 12:57:25 -03:00
parent 2f125ebc33
commit 5017cc6ba2

View File

@@ -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)