aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-19 11:20:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-19 11:20:30 -0200
commit4ac58853dc820127a11a14ed8bde1fae9458369e (patch)
treee8179692c97e935ba921c8ebd17abf9c8510d89e /lobject.h
parentf2c451d7455aad3496f32dfa2bfca7f7e8b5376d (diff)
downloadlua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.gz
lua-4ac58853dc820127a11a14ed8bde1fae9458369e.tar.bz2
lua-4ac58853dc820127a11a14ed8bde1fae9458369e.zip
thead-specific state separated from "global" state
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/lobject.h b/lobject.h
index ec27403c..d025e43d 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.85 2000/12/28 12:55:41 roberto Exp roberto $ 2** $Id: lobject.h,v 1.86 2001/01/18 15:59:09 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*/
@@ -15,11 +15,9 @@
15#ifdef LUA_DEBUG 15#ifdef LUA_DEBUG
16#undef NDEBUG 16#undef NDEBUG
17#include <assert.h> 17#include <assert.h>
18#define LUA_INTERNALERROR(s) assert(((void)s,0)) 18#define lua_assert(c) assert(c)
19#define LUA_ASSERT(c,s) assert(((void)s,(c)))
20#else 19#else
21#define LUA_INTERNALERROR(s) /* empty */ 20#define lua_assert(c) /* empty */
22#define LUA_ASSERT(c,s) /* empty */
23#endif 21#endif
24 22
25 23
@@ -67,27 +65,27 @@ typedef struct lua_TObject {
67 65
68/* Macros to set values */ 66/* Macros to set values */
69#define setnvalue(obj,x) \ 67#define setnvalue(obj,x) \
70 { TObject *o=(obj); o->tt=LUA_TNUMBER; o->value.n=(x); } 68 { TObject *_o=(obj); _o->tt=LUA_TNUMBER; _o->value.n=(x); }
71 69
72#define setsvalue(obj,x) \ 70#define setsvalue(obj,x) \
73 { TObject *o=(obj); struct TString *v=(x); \ 71 { TObject *_o=(obj); struct TString *_v=(x); \
74 o->tt=LUA_TSTRING; o->value.v=v; } 72 _o->tt=LUA_TSTRING; _o->value.v=_v; }
75 73
76#define setuvalue(obj,x) \ 74#define setuvalue(obj,x) \
77 { TObject *o=(obj); struct TString *v=(x); \ 75 { TObject *_o=(obj); struct TString *_v=(x); \
78 o->tt=LUA_TUSERDATA; o->value.v=v; } 76 _o->tt=LUA_TUSERDATA; _o->value.v=_v; }
79 77
80#define setclvalue(obj,x) \ 78#define setclvalue(obj,x) \
81 { TObject *o=(obj); struct Closure *v=(x); \ 79 { TObject *_o=(obj); struct Closure *_v=(x); \
82 o->tt=LUA_TFUNCTION; o->value.v=v; } 80 _o->tt=LUA_TFUNCTION; _o->value.v=_v; }
83 81
84#define sethvalue(obj,x) \ 82#define sethvalue(obj,x) \
85 { TObject *o=(obj); struct Hash *v=(x); \ 83 { TObject *_o=(obj); struct Hash *_v=(x); \
86 o->tt=LUA_TTABLE; o->value.v=v; } 84 _o->tt=LUA_TTABLE; _o->value.v=_v; }
87 85
88#define setivalue(obj,x) \ 86#define setivalue(obj,x) \
89 { TObject *o=(obj); struct CallInfo *v=(x); \ 87 { TObject *_o=(obj); struct CallInfo *_v=(x); \
90 o->tt=LUA_TMARK; o->value.v=v; } 88 _o->tt=LUA_TMARK; _o->value.v=_v; }
91 89
92#define setnilvalue(obj) { (obj)->tt=LUA_TNIL; } 90#define setnilvalue(obj) { (obj)->tt=LUA_TNIL; }
93 91