** 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. */
| 585 | ** are no "precision" problems. |
| 586 | */ |
| 587 | static int luaK_intK (FuncState *fs, lua_Integer n) { |
| 588 | TValue k, o; |
| 589 | setpvalue(&k, cast_voidp(cast_sizet(n))); |
| 590 | setivalue(&o, n); |
| 591 | return addk(fs, &k, &o); |
| 592 | } |
| 593 | |
| 594 | /* |
| 595 | ** Add a float to list of constants and return its index. |
no test coverage detected