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

Function xml_document__load_buffer_inplace

NULLC/includes/pugi.cpp:632–644  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {
634 if(!document->impl){ nullcThrowError("xml_document constructor wasn't called"); return NULL; }
635 pugi::xml_document *doc = document->impl->document;
636 if(!doc)
637 {
638 doc = document->impl->document = (pugi::xml_document*)nullcAllocate(sizeof(pugi::xml_document));
639 ::new(doc) pugi::xml_document();
640 }
641 xml_parse_result *res = (xml_parse_result*)nullcAllocate(sizeof(xml_parse_result));
642 *res = doc->load_buffer_inplace(contents.ptr, size, options, encoding);
643 return res;
644 }
645
646 void xml_document__save(NULLCFuncPtr writer, NULLCArray indent, int flags, pugi::xml_encoding encoding, xml_document* document)
647 {

Callers

nothing calls this directly

Calls 3

nullcAllocateFunction · 0.85
load_buffer_inplaceMethod · 0.80
nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected