From 593bfc96685bd518978d2622671412d1862881e6 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 7 Feb 2007 15:48:52 -0200 Subject: should not manipulate NULL pointers (even without accessing them) --- lstate.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 9d4f0887..2cbcc7ce 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.26 2006/08/15 19:59:20 roberto Exp roberto $ +** $Id: lstate.h,v 2.27 2006/09/19 13:57:50 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -156,8 +156,7 @@ union GCObject { #define gco2h(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) -#define ngcotouv(o) \ - check_exp((o) == NULL || (o)->gch.tt == LUA_TUPVAL, &((o)->uv)) +#define ngcotouv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) #define gco2th(o) check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th)) /* macro to convert any Lua object into a GCObject */ -- cgit v1.2.3-55-g6feb