diff options
Diffstat (limited to 'libexslt/saxon.c')
-rw-r--r-- | libexslt/saxon.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libexslt/saxon.c b/libexslt/saxon.c index 15343969..00b74a48 100644 --- a/libexslt/saxon.c +++ b/libexslt/saxon.c @@ -29,12 +29,18 @@ * * Returns the data for this transformation */ -static xmlHashTablePtr +static void * exsltSaxonInit (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED) { return xmlHashCreate(1); } +static void +exsltSaxonFreeCompExprEntry(void *payload, + const xmlChar *name ATTRIBUTE_UNUSED) { + xmlXPathFreeCompExpr((xmlXPathCompExprPtr) payload); +} + /** * exsltSaxonShutdown: * @ctxt: an XSLT transformation context @@ -46,8 +52,9 @@ exsltSaxonInit (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, static void exsltSaxonShutdown (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED, - xmlHashTablePtr data) { - xmlHashFree(data, (xmlHashDeallocator) xmlXPathFreeCompExpr); + void *vdata) { + xmlHashTablePtr data = (xmlHashTablePtr) vdata; + xmlHashFree(data, exsltSaxonFreeCompExprEntry); } @@ -293,8 +300,8 @@ exsltSaxonLineNumberFunction(xmlXPathParserContextPtr ctxt, int nargs) { void exsltSaxonRegister (void) { xsltRegisterExtModule (SAXON_NAMESPACE, - (xsltExtInitFunction) exsltSaxonInit, - (xsltExtShutdownFunction) exsltSaxonShutdown); + exsltSaxonInit, + exsltSaxonShutdown); xsltRegisterExtModuleFunction((const xmlChar *) "expression", SAXON_NAMESPACE, exsltSaxonExpressionFunction); |