From 0bccf03d7e425d6f2d2ead6f49eb67016956b413 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 May 2010 15:44:46 -0300 Subject: slightly better definition for 'changenvalue' --- lobject.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lobject.h b/lobject.h index 22f4354c..986001f2 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.38 2010/04/14 15:13:48 roberto Exp roberto $ +** $Id: lobject.h,v 2.39 2010/04/18 13:22:48 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -142,8 +142,7 @@ typedef struct lua_TValue { #define setfvalue(obj,x) \ { TValue *i_o=(obj); i_o->value_.f=(x); i_o->tt_=LUA_TLCF; } -#define changenvalue(obj,x) \ - ( lua_assert((obj)->tt_==LUA_TNUMBER), (obj)->value_.n=(x) ) +#define changenvalue(o,x) check_exp((o)->tt_==LUA_TNUMBER, (o)->value_.n=(x)) #define setpvalue(obj,x) \ { TValue *i_o=(obj); i_o->value_.p=(x); i_o->tt_=LUA_TLIGHTUSERDATA; } -- cgit v1.2.3-55-g6feb