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