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

Function spacePush

ThirdParty/libxml2/vtklibxml2/parser.c:2225–2242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2223}
2224
2225static int spacePush(xmlParserCtxtPtr ctxt, int val) {
2226 if (ctxt->spaceNr >= ctxt->spaceMax) {
2227 int *tmp;
2228
2229 ctxt->spaceMax *= 2;
2230 tmp = (int *) xmlRealloc(ctxt->spaceTab,
2231 ctxt->spaceMax * sizeof(ctxt->spaceTab[0]));
2232 if (tmp == NULL) {
2233 xmlErrMemory(ctxt);
2234 ctxt->spaceMax /=2;
2235 return(-1);
2236 }
2237 ctxt->spaceTab = tmp;
2238 }
2239 ctxt->spaceTab[ctxt->spaceNr] = val;
2240 ctxt->space = &ctxt->spaceTab[ctxt->spaceNr];
2241 return(ctxt->spaceNr++);
2242}
2243
2244static int spacePop(xmlParserCtxtPtr ctxt) {
2245 int ret;

Callers 3

xmlParseElementStartFunction · 0.85
parser.cFile · 0.85
xmlCtxtParseContentFunction · 0.85

Calls 1

xmlErrMemoryFunction · 0.85

Tested by

no test coverage detected