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

Function xml_document__load_buffer

NULLC/includes/pugi.cpp:618–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {
620 if(!document->impl){ nullcThrowError("xml_document constructor wasn't called"); return NULL; }
621 pugi::xml_document *doc = document->impl->document;
622 if(!doc)
623 {
624 doc = document->impl->document = (pugi::xml_document*)nullcAllocate(sizeof(pugi::xml_document));
625 ::new(doc) pugi::xml_document();
626 }
627 xml_parse_result *res = (xml_parse_result*)nullcAllocate(sizeof(xml_parse_result));
628 *res = doc->load_buffer(contents.ptr, size, options, encoding);
629 return res;
630 }
631
632 xml_parse_result* xml_document__load_buffer_inplace(NULLCArray contents, int size, unsigned int options, pugi::xml_encoding encoding, xml_document* document)
633 {

Callers

nothing calls this directly

Calls 3

nullcAllocateFunction · 0.85
load_bufferMethod · 0.80
nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected