| 358 | |
| 359 | |
| 360 | void luaV_arith (lua_State *L, StkId ra, const TValue *rb, |
| 361 | const TValue *rc, TMS op) { |
| 362 | TValue tempb, tempc; |
| 363 | const TValue *b, *c; |
| 364 | if ((b = luaV_tonumber(rb, &tempb)) != NULL && |
| 365 | (c = luaV_tonumber(rc, &tempc)) != NULL) { |
| 366 | lua_Number res = luaO_arith(op - TM_ADD + LUA_OPADD, nvalue(b), nvalue(c)); |
| 367 | setnvalue(ra, res); |
| 368 | } |
| 369 | else if (!call_binTM(L, rb, rc, ra, op)) |
| 370 | luaG_aritherror(L, rb, rc); |
| 371 | } |
| 372 | |
| 373 | |
| 374 | /* |
no test coverage detected