mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
simpler 'luai_apicheck' (and avoids compilation error...)
This commit is contained in:
parent
2f125ebc33
commit
5017cc6ba2
1 changed files with 7 additions and 3 deletions
10
llimits.h
10
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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue