diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-09 18:49:52 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-03-09 18:49:52 -0300 |
commit | 0969a971cd41921bd5ee72c1da880455bcca3bb4 (patch) | |
tree | 74be9a39706eeb1e7f4e5c2cf49693364c399790 /lobject.h | |
parent | be6d215f674f3d148d3f80a0553e8b2aa6da51d7 (diff) | |
download | lua-0969a971cd41921bd5ee72c1da880455bcca3bb4.tar.gz lua-0969a971cd41921bd5ee72c1da880455bcca3bb4.tar.bz2 lua-0969a971cd41921bd5ee72c1da880455bcca3bb4.zip |
better use of "ASSERT".
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.16 1998/01/19 19:49:22 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.17 1998/03/06 16:54:42 roberto Exp $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -13,6 +13,17 @@ | |||
13 | #include "lua.h" | 13 | #include "lua.h" |
14 | 14 | ||
15 | 15 | ||
16 | #ifdef DEBUG | ||
17 | #include "lauxlib.h" | ||
18 | #define LUA_INTERNALERROR(s) \ | ||
19 | luaL_verror("INTERNAL ERROR - %s [%s:%d]",(s),__FILE__,__LINE__) | ||
20 | #define LUA_ASSERT(c,s) { if (!(c)) LUA_INTERNALERROR(s); } | ||
21 | #else | ||
22 | #define LUA_INTERNALERROR(s) /* empty */ | ||
23 | #define LUA_ASSERT(c,s) /* empty */ | ||
24 | #endif | ||
25 | |||
26 | |||
16 | /* | 27 | /* |
17 | ** "real" is the type "number" of Lua | 28 | ** "real" is the type "number" of Lua |
18 | ** GREP LUA_NUMBER to change that | 29 | ** GREP LUA_NUMBER to change that |