diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-09-11 15:21:44 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-09-11 15:21:44 -0300 |
commit | cf160abcf9f7d42d1acf841f7720cb8c2baa5e3c (patch) | |
tree | 77f81a3f816d31131e80083851563bdeedf9cf31 | |
parent | ae1d318822c2b531aa69ac0dfed1edc6470f6200 (diff) | |
download | lua-cf160abcf9f7d42d1acf841f7720cb8c2baa5e3c.tar.gz lua-cf160abcf9f7d42d1acf841f7720cb8c2baa5e3c.tar.bz2 lua-cf160abcf9f7d42d1acf841f7720cb8c2baa5e3c.zip |
no more macro 'changenvalue'
-rw-r--r-- | lapi.c | 4 | ||||
-rw-r--r-- | lobject.h | 7 |
2 files changed, 4 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.164 2012/06/08 15:14:04 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.165 2012/08/14 18:12:34 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -295,7 +295,7 @@ LUA_API void lua_arith (lua_State *L, int op) { | |||
295 | o1 = L->top - 2; | 295 | o1 = L->top - 2; |
296 | o2 = L->top - 1; | 296 | o2 = L->top - 1; |
297 | if (ttisnumber(o1) && ttisnumber(o2)) { | 297 | if (ttisnumber(o1) && ttisnumber(o2)) { |
298 | changenvalue(o1, luaO_arith(op, nvalue(o1), nvalue(o2))); | 298 | setnvalue(o1, luaO_arith(op, nvalue(o1), nvalue(o2))); |
299 | } | 299 | } |
300 | else | 300 | else |
301 | luaV_arith(L, o1, o1, o2, cast(TMS, op - LUA_OPADD + TM_ADD)); | 301 | luaV_arith(L, o1, o1, o2, cast(TMS, op - LUA_OPADD + TM_ADD)); |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.69 2012/05/08 13:53:33 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.70 2012/05/11 14:10:50 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 | */ |
@@ -52,8 +52,7 @@ | |||
52 | #define LUA_TCCL (LUA_TFUNCTION | (2 << 4)) /* C closure */ | 52 | #define LUA_TCCL (LUA_TFUNCTION | (2 << 4)) /* C closure */ |
53 | 53 | ||
54 | 54 | ||
55 | /* | 55 | /* Variant tags for strings */ |
56 | ** LUA_TSTRING variants */ | ||
57 | #define LUA_TSHRSTR (LUA_TSTRING | (0 << 4)) /* short strings */ | 56 | #define LUA_TSHRSTR (LUA_TSTRING | (0 << 4)) /* short strings */ |
58 | #define LUA_TLNGSTR (LUA_TSTRING | (1 << 4)) /* long strings */ | 57 | #define LUA_TLNGSTR (LUA_TSTRING | (1 << 4)) /* long strings */ |
59 | 58 | ||
@@ -188,8 +187,6 @@ typedef struct lua_TValue TValue; | |||
188 | #define setnvalue(obj,x) \ | 187 | #define setnvalue(obj,x) \ |
189 | { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); } | 188 | { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); } |
190 | 189 | ||
191 | #define changenvalue(o,x) check_exp(ttisnumber(o), num_(o)=(x)) | ||
192 | |||
193 | #define setnilvalue(obj) settt_(obj, LUA_TNIL) | 190 | #define setnilvalue(obj) settt_(obj, LUA_TNIL) |
194 | 191 | ||
195 | #define setfvalue(obj,x) \ | 192 | #define setfvalue(obj,x) \ |