MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaK_intK

Function luaK_intK

Plugins/slua_unreal/External/lua/lcode.cpp:469–474  ·  view source on GitHub ↗

** 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. */

Source from the content-addressed store, hash-verified

467** are no "precision" problems.
468*/
469int luaK_intK (FuncState *fs, lua_Integer n) {
470 TValue k, o;
471 setpvalue(&k, cast(void*, cast(size_t, n)));
472 setivalue(&o, n);
473 return addk(fs, &k, &o);
474}
475
476/*
477** Add a float to list of constants and return its index.

Callers 3

discharge2regFunction · 0.85
luaK_exp2RKFunction · 0.85
fornumFunction · 0.85

Calls 1

addkFunction · 0.85

Tested by

no test coverage detected