diff options
-rw-r--r-- | lobject.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.25 2009/03/26 12:56:38 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.26 2009/06/17 17:48:34 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 | */ |
@@ -119,6 +119,9 @@ typedef struct lua_TValue { | |||
119 | #define setnvalue(obj,x) \ | 119 | #define setnvalue(obj,x) \ |
120 | { TValue *i_o=(obj); i_o->value.n=(x); i_o->tt=LUA_TNUMBER; } | 120 | { TValue *i_o=(obj); i_o->value.n=(x); i_o->tt=LUA_TNUMBER; } |
121 | 121 | ||
122 | #define changenvalue(obj,x) \ | ||
123 | ( lua_assert((obj)->tt==LUA_TNUMBER), (obj)->value.n=(x) ) | ||
124 | |||
122 | #define setpvalue(obj,x) \ | 125 | #define setpvalue(obj,x) \ |
123 | { TValue *i_o=(obj); i_o->value.p=(x); i_o->tt=LUA_TLIGHTUSERDATA; } | 126 | { TValue *i_o=(obj); i_o->value.p=(x); i_o->tt=LUA_TLIGHTUSERDATA; } |
124 | 127 | ||