MCPcopy Create free account
hub / github.com/crawl/crawl / json_remove_from_parent

Function json_remove_from_parent

crawl-ref/source/json.cc:640–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640void json_remove_from_parent(JsonNode *node)
641{
642 JsonNode *parent = node->parent;
643
644 if (parent != nullptr)
645 {
646 if (node->prev != nullptr)
647 node->prev->next = node->next;
648 else
649 parent->children.head = node->next;
650 if (node->next != nullptr)
651 node->next->prev = node->prev;
652 else
653 parent->children.tail = node->prev;
654
655 free(node->key);
656
657 node->parent = nullptr;
658 node->prev = node->next = nullptr;
659 node->key = nullptr;
660 }
661}
662
663static bool parse_value(const char **sp, JsonNode **out)
664{

Callers 1

json_deleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected