MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / lua_tonumberx

Function lua_tonumberx

libraries/AP_Scripting/lua/src/lapi.c:345–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343
344
345LUA_API lua_Number lua_tonumberx (lua_State *L, int idx, int *pisnum) {
346 lua_Number n;
347 const TValue *o = index2addr(L, idx);
348 int isnum = tonumber(o, &n);
349 if (!isnum)
350 n = 0; /* call to 'tonumber' may change 'n' even if it fails */
351 if (pisnum) *pisnum = isnum;
352 return n;
353}
354
355
356LUA_API lua_Integer lua_tointegerx (lua_State *L, int idx, int *pisnum) {

Callers 4

coerce_to_uint32_tFunction · 0.85
coerce_to_uint64_tFunction · 0.85
AP_Logger_WriteFunction · 0.85
luaL_checknumberFunction · 0.85

Calls 1

index2addrFunction · 0.85

Tested by

no test coverage detected