diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-29 15:14:16 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-04-29 15:14:16 -0300 |
commit | ffa43df3cd0593a3fb92fe0411a81a9ae6eb3c1d (patch) | |
tree | 951d914937967b00d1739d477f7183ef7fe2667e /lobject.c | |
parent | 9c4398de8f334ffaeb805450f158f89db8fd53c0 (diff) | |
download | lua-ffa43df3cd0593a3fb92fe0411a81a9ae6eb3c1d.tar.gz lua-ffa43df3cd0593a3fb92fe0411a81a9ae6eb3c1d.tar.bz2 lua-ffa43df3cd0593a3fb92fe0411a81a9ae6eb3c1d.zip |
'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue')
Diffstat (limited to 'lobject.c')
-rw-r--r-- | lobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.c,v 2.80 2014/04/15 16:32:49 roberto Exp roberto $ | 2 | ** $Id: lobject.c,v 2.81 2014/04/27 14:41:11 roberto Exp roberto $ |
3 | ** Some generic functions over Lua objects | 3 | ** Some generic functions over Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -126,7 +126,7 @@ void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2, | |||
126 | case LUA_OPDIV: { /* operates only on floats */ | 126 | case LUA_OPDIV: { /* operates only on floats */ |
127 | lua_Number n1; lua_Number n2; | 127 | lua_Number n1; lua_Number n2; |
128 | if (tonumber(p1, &n1) && tonumber(p2, &n2)) { | 128 | if (tonumber(p1, &n1) && tonumber(p2, &n2)) { |
129 | setnvalue(res, numarith(L, op, n1, n2)); | 129 | setfltvalue(res, numarith(L, op, n1, n2)); |
130 | return; | 130 | return; |
131 | } | 131 | } |
132 | else break; /* go to the end */ | 132 | else break; /* go to the end */ |
@@ -139,7 +139,7 @@ void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2, | |||
139 | return; | 139 | return; |
140 | } | 140 | } |
141 | else if (tonumber(p1, &n1) && tonumber(p2, &n2)) { | 141 | else if (tonumber(p1, &n1) && tonumber(p2, &n2)) { |
142 | setnvalue(res, numarith(L, op, n1, n2)); | 142 | setfltvalue(res, numarith(L, op, n1, n2)); |
143 | return; | 143 | return; |
144 | } | 144 | } |
145 | else break; /* go to the end */ | 145 | else break; /* go to the end */ |
@@ -351,7 +351,7 @@ const char *luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp) { | |||
351 | break; | 351 | break; |
352 | } | 352 | } |
353 | case 'f': { | 353 | case 'f': { |
354 | setnvalue(L->top++, cast_num(va_arg(argp, l_uacNumber))); | 354 | setfltvalue(L->top++, cast_num(va_arg(argp, l_uacNumber))); |
355 | break; | 355 | break; |
356 | } | 356 | } |
357 | case 'p': { | 357 | case 'p': { |