MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaK_intK

Function luaK_intK

src/Chain/libraries/glua/lcode.cpp:352–357  ·  view source on GitHub ↗

** Integers use userdata as keys to avoid collision with floats with same ** value; conversion to 'void*' used only for hashing, no "precision" ** problems */

Source from the content-addressed store, hash-verified

350** problems
351*/
352int luaK_intK(FuncState *fs, lua_Integer n) {
353 TValue k, o;
354 setpvalue(&k, lua_cast(void*, lua_cast(size_t, n)));
355 setivalue(&o, n);
356 return addk(fs, &k, &o);
357}
358
359
360static int luaK_numberK(FuncState *fs, lua_Number r) {

Callers 3

discharge2regFunction · 0.85
luaK_exp2RKFunction · 0.85
fornumFunction · 0.85

Calls 1

addkFunction · 0.85

Tested by

no test coverage detected