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

Function xml_document__load_file

NULLC/includes/pugi.cpp:604–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602 }
603
604 xml_parse_result* xml_document__load_file(NULLCArray name, unsigned int options, pugi::xml_encoding encoding, xml_document* document)
605 {
606 if(!document->impl){ nullcThrowError("xml_document constructor wasn't called"); return NULL; }
607 pugi::xml_document *doc = document->impl->document;
608 if(!doc)
609 {
610 doc = document->impl->document = (pugi::xml_document*)nullcAllocate(sizeof(pugi::xml_document));
611 ::new(doc) pugi::xml_document();
612 }
613 xml_parse_result *res = (xml_parse_result*)nullcAllocate(sizeof(xml_parse_result));
614 *res = doc->load_file(name.ptr, options, encoding);
615 return res;
616 }
617
618 xml_parse_result* xml_document__load_buffer(NULLCArray contents, int size, unsigned int options, pugi::xml_encoding encoding, xml_document* document)
619 {

Callers

nothing calls this directly

Calls 3

nullcAllocateFunction · 0.85
load_fileMethod · 0.80
nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected