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

Function fxGetHostBufferLength

xs/sources/xsAPI.c:704–717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

702}
703
704txInteger fxGetHostBufferLength(txMachine* the, txSlot* slot)
705{
706 txSlot* host = fxCheckHostObject(the, slot);
707 if (host) {
708 txSlot* bufferInfo = host->next;
709 if (host->flag & XS_HOST_CHUNK_FLAG)
710 mxSyntaxError("C: xsGetHostBufferLength: no host data");
711 if (!bufferInfo || (bufferInfo->kind != XS_BUFFER_INFO_KIND))
712 mxSyntaxError("C: xsGetHostBufferLength: not a host buffer");
713 return bufferInfo->value.bufferInfo.length;
714 }
715 mxSyntaxError("C: xsGetHostData: not a host object");
716 return 0;
717}
718
719void* fxGetHostChunk(txMachine* the, txSlot* slot)
720{

Callers

nothing calls this directly

Calls 1

fxCheckHostObjectFunction · 0.85

Tested by

no test coverage detected