diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:48:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2001-06-28 11:48:44 -0300 |
commit | b346834a09c086affce6308c7917a8f6af310d11 (patch) | |
tree | 960750333f506d0dc88e0b92e68dbda48234b176 /lobject.h | |
parent | 61a036eaa5918bdf5d7f01443b43288030337d20 (diff) | |
download | lua-b346834a09c086affce6308c7917a8f6af310d11.tar.gz lua-b346834a09c086affce6308c7917a8f6af310d11.tar.bz2 lua-b346834a09c086affce6308c7917a8f6af310d11.zip |
new macros for changing numbers
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 1.106 2001/06/15 20:36:57 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 1.107 2001/06/26 13:20:45 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 | */ |
@@ -55,6 +55,8 @@ typedef struct lua_TObject { | |||
55 | #define setnvalue(obj,x) \ | 55 | #define setnvalue(obj,x) \ |
56 | { TObject *_o=(obj); _o->tt=LUA_TNUMBER; _o->value.n=(x); } | 56 | { TObject *_o=(obj); _o->tt=LUA_TNUMBER; _o->value.n=(x); } |
57 | 57 | ||
58 | #define chgnvalue(obj,x) ((obj)->value.n=(x)) | ||
59 | |||
58 | #define setsvalue(obj,x) \ | 60 | #define setsvalue(obj,x) \ |
59 | { TObject *_o=(obj); _o->tt=LUA_TSTRING; _o->value.ts=(x); } | 61 | { TObject *_o=(obj); _o->tt=LUA_TSTRING; _o->value.ts=(x); } |
60 | 62 | ||