* xmlXPathVariableLookup: * @ctxt: the XPath context * @name: the variable name * * Search in the Variable array of the context for the given * variable value. * * Returns a copy of the value or NULL if not found */
| 4131 | * Returns a copy of the value or NULL if not found |
| 4132 | */ |
| 4133 | xmlXPathObjectPtr |
| 4134 | xmlXPathVariableLookup(xmlXPathContextPtr ctxt, const xmlChar *name) { |
| 4135 | if (ctxt == NULL) |
| 4136 | return(NULL); |
| 4137 | |
| 4138 | if (ctxt->varLookupFunc != NULL) { |
| 4139 | xmlXPathObjectPtr ret; |
| 4140 | |
| 4141 | ret = ((xmlXPathVariableLookupFunc)ctxt->varLookupFunc) |
| 4142 | (ctxt->varLookupData, name, NULL); |
| 4143 | return(ret); |
| 4144 | } |
| 4145 | return(xmlXPathVariableLookupNS(ctxt, name, NULL)); |
| 4146 | } |
| 4147 | |
| 4148 | /** |
| 4149 | * xmlXPathVariableLookupNS: |
no test coverage detected