* xmlXPathFreeContext: * @ctxt: the context to free * * Free up an xmlXPathContext */
| 5144 | * Free up an xmlXPathContext |
| 5145 | */ |
| 5146 | void |
| 5147 | xmlXPathFreeContext(xmlXPathContextPtr ctxt) { |
| 5148 | if (ctxt == NULL) return; |
| 5149 | |
| 5150 | if (ctxt->cache != NULL) |
| 5151 | xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache); |
| 5152 | xmlXPathRegisteredNsCleanup(ctxt); |
| 5153 | xmlXPathRegisteredFuncsCleanup(ctxt); |
| 5154 | xmlXPathRegisteredVariablesCleanup(ctxt); |
| 5155 | xmlResetError(&ctxt->lastError); |
| 5156 | xmlFree(ctxt); |
| 5157 | } |
| 5158 | |
| 5159 | /** |
| 5160 | * xmlXPathSetErrorHandler: |