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

Function fx_parseURLSetPart

modules/data/url/url.c:1460–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1458}
1459
1460void fx_parseURLSetPart(txMachine* the, txSlot* target, txID id, txIndex index, txStringStream* dst)
1461{
1462 txSize size = dst->offset + 1;
1463 txString string = fxRenewChunk(the, dst->slot->value.string, size);
1464 if (!string) {
1465 string = (txString)fxNewChunk(the, size);
1466 c_memcpy(string, dst->slot->value.string, size);
1467 }
1468 mxPushString(string);
1469 mxPushSlot(target);
1470 mxSetAll(id, index);
1471 mxPop();
1472 dst->slot->value.string = fxNewChunk(the, mx_parseURLBufferSize);
1473 dst->size = mx_parseURLBufferSize;
1474 dst->offset = 0;
1475 dst->slot->value.string[0] = 0;
1476}
1477
1478void fx_parseURLShortenPath(txMachine* the, txSlot* path)
1479{

Callers 1

fx_parseURLFunction · 0.85

Calls 2

fxRenewChunkFunction · 0.85
fxNewChunkFunction · 0.85

Tested by

no test coverage detected