From 426d3e43bdec4b1ab2b0aed1844396c27f64872f Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 2 Feb 2001 13:13:05 -0200 Subject: lock/unlock may use L + better structure for internal debug stuff --- lobject.h | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index e1170615..447b3622 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 1.91 2001/01/29 19:34:02 roberto Exp roberto $ +** $Id: lobject.h,v 1.92 2001/02/01 17:40:48 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -12,19 +12,12 @@ #include "lua.h" -#ifdef LUA_DEBUG -#undef NDEBUG -#include -#define lua_assert(c) assert(c) -#else +#ifndef lua_assert #define lua_assert(c) /* empty */ #endif -#ifdef LUA_DEBUG -/* to avoid warnings, and make sure value is really unused */ -#define UNUSED(x) (x=0, (void)(x)) -#else +#ifndef UNUSED #define UNUSED(x) ((void)(x)) /* to avoid warnings */ #endif @@ -88,8 +81,7 @@ typedef struct lua_TObject { { TObject *_o=(obj); struct CallInfo *_v=(x); \ _o->tt=LUA_TMARK; _o->value.v=_v; } -#define setnilvalue(obj) \ - { TObject *_o=(obj); _o->tt=LUA_TNIL; _o->value.v = (void *)&luaO_ttnil; } +#define setnilvalue(obj) ((obj)->tt=LUA_TNIL) #define setobj(obj1,obj2) \ { TObject *o1=(obj1); const TObject *o2=(obj2); \ @@ -220,7 +212,6 @@ typedef struct CallInfo { } CallInfo; -extern const char luaO_ttnil; /* "address" of the nil value */ extern const TObject luaO_nilobject; -- cgit v1.2.3-55-g6feb