aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-02-07 15:48:52 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2007-02-07 15:48:52 -0200
commit593bfc96685bd518978d2622671412d1862881e6 (patch)
tree012c636861eebbf2c173de6ae70fea52f5cfd3e9 /lstate.h
parent850c60e81bc5959ba73ace3ab4e48a2b8f879036 (diff)
downloadlua-593bfc96685bd518978d2622671412d1862881e6.tar.gz
lua-593bfc96685bd518978d2622671412d1862881e6.tar.bz2
lua-593bfc96685bd518978d2622671412d1862881e6.zip
should not manipulate NULL pointers (even without accessing them)
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lstate.h b/lstate.h
index 9d4f0887..2cbcc7ce 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.26 2006/08/15 19:59:20 roberto Exp roberto $ 2** $Id: lstate.h,v 2.27 2006/09/19 13:57:50 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -156,8 +156,7 @@ union GCObject {
156#define gco2h(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) 156#define gco2h(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
157#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) 157#define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
158#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) 158#define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
159#define ngcotouv(o) \ 159#define ngcotouv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
160 check_exp((o) == NULL || (o)->gch.tt == LUA_TUPVAL, &((o)->uv))
161#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) 160#define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
162 161
163/* macro to convert any Lua object into a GCObject */ 162/* macro to convert any Lua object into a GCObject */