| 103 | #endif /* kPinBanks */ |
| 104 | |
| 105 | xsSlot *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 | |
| 118 | static const char *gFormats[] = { |
| 119 | "number", |
no test coverage detected