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

Function fxGetHostChunkValidate

xs/sources/xsAPI.c:741–754  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739}
740
741void* fxGetHostChunkValidate(txMachine* the, txSlot* slot, void* validator)
742{
743 txSlot* host = fxCheckHostObject(the, slot);
744 if (host) {
745 if (host->flag & XS_HOST_CHUNK_FLAG) {
746 if (validator == host->value.host.variant.destructor)
747 return host->value.host.data;
748 mxSyntaxError("C: xsGetHostChunk: invalid host data");
749 }
750 mxSyntaxError("C: xsGetHostChunk: no host data");
751 }
752 mxSyntaxError("C: xsGetHostChunk: not a host object");
753 return NULL;
754}
755
756void* fxGetHostData(txMachine* the, txSlot* slot)
757{

Callers

nothing calls this directly

Calls 1

fxCheckHostObjectFunction · 0.85

Tested by

no test coverage detected