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

Function fxGetHostDataValidate

xs/sources/xsAPI.c:778–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

776}
777
778void* fxGetHostDataValidate(txMachine* the, txSlot* slot, void* validator)
779{
780 txSlot* host = fxCheckHostObject(the, slot);
781 if (host) {
782 if (!(host->flag & XS_HOST_CHUNK_FLAG)) {
783 if (validator == host->value.host.variant.destructor)
784 return host->value.host.data;
785 mxSyntaxError("C: xsGetHostData: invalid host data");
786 }
787 mxSyntaxError("C: xsGetHostData: no host data");
788 }
789 mxSyntaxError("C: xsGetHostData: not a host object");
790 return NULL;
791}
792
793txDestructor fxGetHostDestructor(txMachine* the, txSlot* slot)
794{

Callers

nothing calls this directly

Calls 1

fxCheckHostObjectFunction · 0.85

Tested by

no test coverage detected