MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlCtxtErrMemory

Function xmlCtxtErrMemory

ThirdParty/libxml2/vtklibxml2/parserInternals.c:132–161  ·  view source on GitHub ↗

* xmlCtxtErrMemory: * @ctxt: an XML parser context * * Handle an out-of-memory error. * * Available since 2.13.0. */

Source from the content-addressed store, hash-verified

130 * Available since 2.13.0.
131 */
132void
133xmlCtxtErrMemory(xmlParserCtxtPtr ctxt)
134{
135 xmlStructuredErrorFunc schannel = NULL;
136 xmlGenericErrorFunc channel = NULL;
137 void *data;
138
139 if (ctxt == NULL)
140 return;
141
142 ctxt->errNo = XML_ERR_NO_MEMORY;
143 ctxt->instate = XML_PARSER_EOF; /* TODO: Remove after refactoring */
144 ctxt->wellFormed = 0;
145 ctxt->disableSAX = 2;
146
147 if (ctxt->errorHandler) {
148 schannel = ctxt->errorHandler;
149 data = ctxt->errorCtxt;
150 } else if ((ctxt->sax->initialized == XML_SAX2_MAGIC) &&
151 (ctxt->sax->serror != NULL)) {
152 schannel = ctxt->sax->serror;
153 data = ctxt->userData;
154 } else {
155 channel = ctxt->sax->error;
156 data = ctxt->userData;
157 }
158
159 xmlRaiseMemoryError(schannel, channel, data, XML_FROM_PARSER,
160 &ctxt->lastError);
161}
162
163/**
164 * xmlCtxtErrIO:

Callers 15

xmlVErrMemoryFunction · 0.85
xmlSAX2ErrMemoryFunction · 0.85
SAX2.cFile · 0.85
xmlSAX2TextNodeFunction · 0.85
xmlSAX2AttributeNsFunction · 0.85
htmlErrMemoryFunction · 0.85
xmlTextReaderErrMemoryFunction · 0.85
xmlCtxtVErrFunction · 0.85
xmlSwitchInputEncodingFunction · 0.85
xmlSetDeclaredEncodingFunction · 0.85
xmlNewInputStreamFunction · 0.85
xmlNewInputInternalFunction · 0.85

Calls 1

xmlRaiseMemoryErrorFunction · 0.85

Tested by

no test coverage detected