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

Function fxGetHostHooksValidate

xs/sources/xsAPI.c:837–851  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837txHostHooks* fxGetHostHooksValidate(txMachine* the, txSlot* slot, txString validator)
838{
839 txSlot* host = fxCheckHostObject(the, slot);
840 if (host) {
841 if (host->flag & XS_HOST_HOOKS_FLAG) {
842 txString signature = host->value.host.variant.hooks->signature;
843 if ((signature != C_NULL) && (!c_strcmp(signature, validator)))
844 return host->value.host.variant.hooks;
845 mxSyntaxError("C: xsGetHostHooks: invalid");
846 }
847 mxSyntaxError("C: xsGetHostHooks: no host hooks");
848 }
849 mxSyntaxError("C: xsGetHostHooks: not a host object");
850 return NULL;
851}
852
853void fxPetrifyHostBuffer(txMachine* the, txSlot* slot)
854{

Callers

nothing calls this directly

Calls 1

fxCheckHostObjectFunction · 0.85

Tested by

no test coverage detected