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

Function PiuContainer_remove

modules/piu/All/piuContainer.c:753–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753void PiuContainer_remove(xsMachine *the)
754{
755 PiuContainer* self = PIU(Container, xsThis);
756 PiuContent* content = PIU(Content, xsArg(0));
757 PiuContent* previous;
758 PiuContent* next;
759 xsAssert(self != NULL);
760 xsAssert(content != NULL);
761 xsAssert((*content)->container == self);
762 PiuContentReflow(content, piuSizeChanged);
763 PiuContentInvalidate(content, NULL);
764 PiuContainerUnbindContent(self, content);
765 previous = (*content)->previous;
766 next = (*content)->next;
767 if (previous) {
768 (*content)->previous = NULL;
769 (*previous)->next = next;
770 }
771 else
772 (*self)->first = next;
773 if (next) {
774 (*content)->next = NULL;
775 (*next)->previous = previous;
776 }
777 else
778 (*self)->last = previous;
779 (*content)->container = NULL;
780}
781
782void PiuContainer_replace(xsMachine *the)
783{

Callers

nothing calls this directly

Calls 3

PiuContentReflowFunction · 0.85
PiuContentInvalidateFunction · 0.85

Tested by

no test coverage detected