diff options
Diffstat (limited to 'lvm.c')
| -rw-r--r-- | lvm.c | 7 |
1 files changed, 3 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.280 2003/03/06 19:37:42 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.281 2003/03/07 13:21:31 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -357,11 +357,10 @@ static void Arith (lua_State *L, StkId ra, | |||
| 357 | case TM_MUL: setnvalue(ra, nvalue(b) * nvalue(c)); break; | 357 | case TM_MUL: setnvalue(ra, nvalue(b) * nvalue(c)); break; |
| 358 | case TM_DIV: setnvalue(ra, nvalue(b) / nvalue(c)); break; | 358 | case TM_DIV: setnvalue(ra, nvalue(b) / nvalue(c)); break; |
| 359 | case TM_POW: { | 359 | case TM_POW: { |
| 360 | const TObject *f = luaH_getstr(hvalue(registry(L)), | 360 | const TObject *f = luaH_getstr(hvalue(gt(L)), G(L)->tmname[TM_POW]); |
| 361 | G(L)->tmname[TM_POW]); | ||
| 362 | ptrdiff_t res = savestack(L, ra); | 361 | ptrdiff_t res = savestack(L, ra); |
| 363 | if (!ttisfunction(f)) | 362 | if (!ttisfunction(f)) |
| 364 | luaG_runerror(L, "`pow' (for `^' operator) is not a function"); | 363 | luaG_runerror(L, "`__pow' (`^' operator) is not a function"); |
| 365 | callTMres(L, f, b, c); | 364 | callTMres(L, f, b, c); |
| 366 | ra = restorestack(L, res); /* previous call may change stack */ | 365 | ra = restorestack(L, res); /* previous call may change stack */ |
| 367 | setobjs2s(ra, L->top); | 366 | setobjs2s(ra, L->top); |
