| 324 | |
| 325 | |
| 326 | int luaK_numberK (FuncState *fs, lua_Number r) { |
| 327 | int n; |
| 328 | lua_State *L = fs->ls->L; |
| 329 | TValue o; |
| 330 | setnvalue(&o, r); |
| 331 | if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ |
| 332 | /* use raw representation as key to avoid numeric problems */ |
| 333 | setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r))); |
| 334 | n = addk(fs, L->top - 1, &o); |
| 335 | L->top--; |
| 336 | } |
| 337 | else |
| 338 | n = addk(fs, &o, &o); /* regular case */ |
| 339 | return n; |
| 340 | } |
| 341 | |
| 342 | |
| 343 | static int boolK (FuncState *fs, int b) { |
no test coverage detected