MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / builtinGetSignedInteger

Function builtinGetSignedInteger

modules/io/common/builtinCommon.c:189–196  ·  view source on GitHub ↗

standard converstion to signed integer but disallows undefined

Source from the content-addressed store, hash-verified

187
188// standard converstion to signed integer but disallows undefined
189int32_t builtinGetSignedInteger(xsMachine *the, xsSlot *slot)
190{
191 xsType type = fxTypeOf(the, slot);
192 if (xsUndefinedType == type)
193 xsUnknownError("invalid");
194
195 return fxToInteger(the, slot);;
196}
197
198// standard converstion to unsigned integer but disallows undefined
199uint32_t builtinGetUnsignedInteger(xsMachine *the, xsSlot *slot)

Callers 15

xs_serial_constructorFunction · 0.85
spi.cFile · 0.85
xs_pwm_constructor_Function · 0.85
xs_pwm_constructor_Function · 0.85
xs_tcp_constructorFunction · 0.85
xs_listener_constructorFunction · 0.85
xs_tcp_constructorFunction · 0.85
xs_listener_constructorFunction · 0.85
xs_tcp_constructorFunction · 0.85
xs_listener_constructorFunction · 0.85
xs_tcp_constructorFunction · 0.85
xs_listener_constructorFunction · 0.85

Calls 2

fxTypeOfFunction · 0.85
fxToIntegerFunction · 0.85

Tested by

no test coverage detected