diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-02 13:13:05 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-02-02 13:13:05 -0200 |
commit | 426d3e43bdec4b1ab2b0aed1844396c27f64872f (patch) | |
tree | 659b73e1e9720fb85c66a481b476c96671eef734 /lobject.h | |
parent | 8823f371a2a63f634121a0c16cb1d02e5ce9f5c5 (diff) | |
download | lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.tar.gz lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.tar.bz2 lua-426d3e43bdec4b1ab2b0aed1844396c27f64872f.zip |
lock/unlock may use L + better structure for internal debug stuff
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 17 |
1 files changed, 4 insertions, 13 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.91 2001/01/29 19:34:02 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.92 2001/02/01 17:40:48 roberto Exp roberto $ |
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 | */ |
@@ -12,19 +12,12 @@ | |||
12 | #include "lua.h" | 12 | #include "lua.h" |
13 | 13 | ||
14 | 14 | ||
15 | #ifdef LUA_DEBUG | 15 | #ifndef lua_assert |
16 | #undef NDEBUG | ||
17 | #include <assert.h> | ||
18 | #define lua_assert(c) assert(c) | ||
19 | #else | ||
20 | #define lua_assert(c) /* empty */ | 16 | #define lua_assert(c) /* empty */ |
21 | #endif | 17 | #endif |
22 | 18 | ||
23 | 19 | ||
24 | #ifdef LUA_DEBUG | 20 | #ifndef UNUSED |
25 | /* to avoid warnings, and make sure value is really unused */ | ||
26 | #define UNUSED(x) (x=0, (void)(x)) | ||
27 | #else | ||
28 | #define UNUSED(x) ((void)(x)) /* to avoid warnings */ | 21 | #define UNUSED(x) ((void)(x)) /* to avoid warnings */ |
29 | #endif | 22 | #endif |
30 | 23 | ||
@@ -88,8 +81,7 @@ typedef struct lua_TObject { | |||
88 | { TObject *_o=(obj); struct CallInfo *_v=(x); \ | 81 | { TObject *_o=(obj); struct CallInfo *_v=(x); \ |
89 | _o->tt=LUA_TMARK; _o->value.v=_v; } | 82 | _o->tt=LUA_TMARK; _o->value.v=_v; } |
90 | 83 | ||
91 | #define setnilvalue(obj) \ | 84 | #define setnilvalue(obj) ((obj)->tt=LUA_TNIL) |
92 | { TObject *_o=(obj); _o->tt=LUA_TNIL; _o->value.v = (void *)&luaO_ttnil; } | ||
93 | 85 | ||
94 | #define setobj(obj1,obj2) \ | 86 | #define setobj(obj1,obj2) \ |
95 | { TObject *o1=(obj1); const TObject *o2=(obj2); \ | 87 | { TObject *o1=(obj1); const TObject *o2=(obj2); \ |
@@ -220,7 +212,6 @@ typedef struct CallInfo { | |||
220 | } CallInfo; | 212 | } CallInfo; |
221 | 213 | ||
222 | 214 | ||
223 | extern const char luaO_ttnil; /* "address" of the nil value */ | ||
224 | extern const TObject luaO_nilobject; | 215 | extern const TObject luaO_nilobject; |
225 | 216 | ||
226 | 217 | ||