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

Function builtinGetCallback

modules/io/common/builtinCommon.c:105–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103#endif /* kPinBanks */
104
105xsSlot *builtinGetCallback(xsMachine *the, xsIdentifier id)
106{
107 xsSlot slot;
108 if (!xsmcGet(slot, xsArg(0), id))
109 return C_NULL;
110 xsType type = fxTypeOf(the, &slot);
111 if ((xsUndefinedType == type) || (xsNullType == type))
112 return C_NULL;
113 if (!xsmcIsCallable(slot))
114 xsUnknownError("not a function");
115 return fxToReference(the, &slot);
116}
117
118static const char *gFormats[] = {
119 "number",

Callers 15

xs_serial_constructorFunction · 0.85
xs_serial_constructorFunction · 0.85
xs_serial_constructorFunction · 0.85
xs_serial_constructorFunction · 0.85
xs_serial_constructorFunction · 0.85
xs_audioout_constructor_Function · 0.85
xs_audioout_constructor_Function · 0.85
xs_audioout_constructor_Function · 0.85
xs_audioout_constructor_Function · 0.85
xs_camera_constructorFunction · 0.85
xs_camera_constructorFunction · 0.85

Calls 2

fxTypeOfFunction · 0.85
fxToReferenceFunction · 0.85

Tested by

no test coverage detected