diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-10 16:17:39 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-01-10 16:17:39 -0200 |
| commit | 8ddfe3df29dfff3ac9f75972150bd263cc4e3487 (patch) | |
| tree | 14d79f1a1653878ef235040935716566acd80c93 /lcode.c | |
| parent | 6eb68ba57a58679cc69837b03490b12ba0cba8d4 (diff) | |
| download | lua-8ddfe3df29dfff3ac9f75972150bd263cc4e3487.tar.gz lua-8ddfe3df29dfff3ac9f75972150bd263cc4e3487.tar.bz2 lua-8ddfe3df29dfff3ac9f75972150bd263cc4e3487.zip | |
macros for all arithmetic operations over lua_Numbers
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.7 2004/10/04 19:01:53 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.8 2004/12/03 20:35:33 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -606,7 +606,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { | |||
| 606 | if (op == OPR_MINUS) { | 606 | if (op == OPR_MINUS) { |
| 607 | luaK_exp2val(fs, e); | 607 | luaK_exp2val(fs, e); |
| 608 | if (e->k == VK && ttisnumber(&fs->f->k[e->info])) | 608 | if (e->k == VK && ttisnumber(&fs->f->k[e->info])) |
| 609 | e->info = luaK_numberK(fs, -nvalue(&fs->f->k[e->info])); | 609 | e->info = luaK_numberK(fs, num_unm(nvalue(&fs->f->k[e->info]))); |
| 610 | else { | 610 | else { |
| 611 | luaK_exp2anyreg(fs, e); | 611 | luaK_exp2anyreg(fs, e); |
| 612 | freeexp(fs, e); | 612 | freeexp(fs, e); |
