** Add an integer to list of constants and return its index. ** Integers use userdata as keys to avoid collision with floats with ** same value; conversion to 'void*' is used only for hashing, so there ** are no "precision" problems. */
| 469 | ** are no "precision" problems. |
| 470 | */ |
| 471 | int luaK_intK (FuncState *fs, lua_Integer n) { |
| 472 | TValue k, o; |
| 473 | setpvalue(&k, cast(void*, cast(size_t, n))); |
| 474 | setivalue(&o, n); |
| 475 | return addk(fs, &k, &o); |
| 476 | } |
| 477 | |
| 478 | /* |
| 479 | ** Add a float to list of constants and return its index. |
no test coverage detected