MCPcopy Create free account
hub / github.com/defold/defold / lua_tonumber

Function lua_tonumber

engine/lua/src/lua/lapi.c:313–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311
312
313LUA_API lua_Number lua_tonumber (lua_State *L, int idx) {
314 TValue n;
315 const TValue *o = index2adr(L, idx);
316 if (tonumber(o, &n))
317 return nvalue(o);
318 else
319 return 0;
320}
321
322
323LUA_API lua_Integer lua_tointeger (lua_State *L, int idx) {

Callers 15

Script_SetFunction · 0.85
LuaToVarFunction · 0.85
TestGetInstanceContextFunction · 0.85
GetInstanceContextTableFunction · 0.85
CreateCallbackFunction · 0.85
TimerDelayFunction · 0.85
Matrix4_mulFunction · 0.85
Vector_newFunction · 0.85
Vector3_newFunction · 0.85
Vector4_newFunction · 0.85
DoCheckTableFunction · 0.85

Calls 1

index2adrFunction · 0.85

Tested by 10

TestGetInstanceContextFunction · 0.68
ReadSerializedTableFunction · 0.68
TEST_FFunction · 0.68
LuaCheckTableFunction · 0.68
TEST_FFunction · 0.68
GetTestScriptExtensionFunction · 0.68
DispatchCallbackTableFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
PrintTableFunction · 0.68