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

Function fxCheckArrayBufferInstance

xs/sources/xsDataView.c:433–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431}
432
433txSlot* fxCheckArrayBufferInstance(txMachine* the, txSlot* slot)
434{
435 if (slot->kind == XS_REFERENCE_KIND) {
436 txSlot* instance = slot->value.reference;
437 txSlot* arrayBuffer = instance->next;
438 if (arrayBuffer && (arrayBuffer->flag & XS_INTERNAL_FLAG) && (arrayBuffer->kind == XS_ARRAY_BUFFER_KIND))
439 return instance;
440 }
441 if (slot == mxThis)
442 mxTypeError("this: not an ArrayBuffer instance");
443 mxTypeError("not an ArrayBuffer instance");
444 return C_NULL;
445}
446
447txSlot* fxCheckArrayBufferMutable(txMachine* the, txSlot* slot)
448{

Calls

no outgoing calls

Tested by

no test coverage detected