MCPcopy Create free account
hub / github.com/WheretIB/nullc / xml_document__load

Function xml_document__load

NULLC/includes/pugi.cpp:590–602  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588 }
589
590 xml_parse_result* xml_document__load(NULLCArray contents, unsigned int options, xml_document* document)
591 {
592 if(!document->impl){ nullcThrowError("xml_document constructor wasn't called"); return NULL; }
593 pugi::xml_document *doc = document->impl->document;
594 if(!doc)
595 {
596 doc = document->impl->document = (pugi::xml_document*)nullcAllocate(sizeof(pugi::xml_document));
597 ::new(doc) pugi::xml_document();
598 }
599 xml_parse_result *res = (xml_parse_result*)nullcAllocate(sizeof(xml_parse_result));
600 *res = doc->load(contents.ptr, options);
601 return res;
602 }
603
604 xml_parse_result* xml_document__load_file(NULLCArray name, unsigned int options, pugi::xml_encoding encoding, xml_document* document)
605 {

Callers

nothing calls this directly

Calls 3

nullcAllocateFunction · 0.85
loadMethod · 0.80
nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected