standard converstion to unsigned integer but disallows undefined
| 197 | |
| 198 | // standard converstion to unsigned integer but disallows undefined |
| 199 | uint32_t builtinGetUnsignedInteger(xsMachine *the, xsSlot *slot) |
| 200 | { |
| 201 | xsIntegerValue value; |
| 202 | xsType type = fxTypeOf(the, slot); |
| 203 | if (xsUndefinedType == type) |
| 204 | xsUnknownError("invalid"); |
| 205 | |
| 206 | value = fxToInteger(the, slot); |
| 207 | if (value < 0) |
| 208 | xsRangeError("negative"); |
| 209 | |
| 210 | return (uint32_t)value; |
| 211 | } |
| 212 | |
| 213 | #if defined(PICO_BUILD) |
| 214 | void builtinInitIO() |
nothing calls this directly
no test coverage detected