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

Function PiuTextConcat

modules/piu/All/piuText.c:501–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501void PiuTextConcat(PiuText* self, xsSlot* slot)
502{
503 xsMachine *the = (*self)->the;
504 PiuTextBuffer* nodeBuffer = (*self)->nodeBuffer;
505 PiuTextOffset nodeOffset = (PiuTextOffset)(*nodeBuffer)->current;
506 PiuTextNodeString node;
507 xsStringValue string = xsToString(*slot);
508 xsIntegerValue length = (xsIntegerValue)c_strlen(string);
509 PiuTextBufferGrow(the, nodeBuffer, sizeof(PiuTextNodeStringRecord));
510 node = NODE(nodeOffset);
511 node->kind = piuTextNodeStringKind;
512 node->fromOffset = (*self)->textOffset;
513 node->string = slot;
514 node->toOffset = node->fromOffset + (PiuTextOffset)length;
515 (*self)->textOffset = node->toOffset;
516}
517
518void PiuTextDictionary(xsMachine* the, void* it)
519{

Callers 4

PiuTextBuildFunction · 0.85
PiuTextDictionaryFunction · 0.85
PiuText_set_stringFunction · 0.85
PiuText_concatFunction · 0.85

Calls 1

PiuTextBufferGrowFunction · 0.85

Tested by

no test coverage detected