diff --git a/libexslt/functions.c b/libexslt/functions.c index 88356348..c93df260 100644 --- a/libexslt/functions.c +++ b/libexslt/functions.c @@ -142,7 +142,7 @@ exsltFuncRegisterImportFunc (void *payload, void *vctxt, * * Returns the data for this transformation */ -static exsltFuncData * +static void * exsltFuncInit (xsltTransformContextPtr ctxt, const xmlChar *URI) { exsltFuncData *ret; xsltStylesheetPtr tmp; @@ -187,7 +187,9 @@ exsltFuncInit (xsltTransformContextPtr ctxt, const xmlChar *URI) { static void exsltFuncShutdown (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED, - exsltFuncData *data) { + void *vdata) { + exsltFuncData *data = (exsltFuncData *) vdata; + if (data->result != NULL) xmlXPathFreeObject(data->result); xmlFree(data); @@ -203,7 +205,7 @@ exsltFuncShutdown (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, * * Returns the allocated data */ -static xmlHashTablePtr +static void * exsltFuncStyleInit (xsltStylesheetPtr style ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED) { return xmlHashCreate(1); @@ -226,7 +228,8 @@ exsltFuncFreeDataEntry(void *payload, const xmlChar *name ATTRIBUTE_UNUSED) { static void exsltFuncStyleShutdown (xsltStylesheetPtr style ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED, - xmlHashTablePtr data) { + void *vdata) { + xmlHashTablePtr data = (xmlHashTablePtr) vdata; xmlHashFree(data, exsltFuncFreeDataEntry); } @@ -792,10 +795,10 @@ exsltFuncResultElem (xsltTransformContextPtr ctxt, void exsltFuncRegister (void) { xsltRegisterExtModuleFull (EXSLT_FUNCTIONS_NAMESPACE, - (xsltExtInitFunction) exsltFuncInit, - (xsltExtShutdownFunction) exsltFuncShutdown, - (xsltStyleExtInitFunction) exsltFuncStyleInit, - (xsltStyleExtShutdownFunction) exsltFuncStyleShutdown); + exsltFuncInit, + exsltFuncShutdown, + exsltFuncStyleInit, + exsltFuncStyleShutdown); xsltRegisterExtModuleTopLevel ((const xmlChar *) "function", EXSLT_FUNCTIONS_NAMESPACE, diff --git a/libexslt/saxon.c b/libexslt/saxon.c index 3b218f90..00b74a48 100644 --- a/libexslt/saxon.c +++ b/libexslt/saxon.c @@ -29,7 +29,7 @@ * * Returns the data for this transformation */ -static xmlHashTablePtr +static void * exsltSaxonInit (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED) { return xmlHashCreate(1); @@ -52,7 +52,8 @@ exsltSaxonFreeCompExprEntry(void *payload, static void exsltSaxonShutdown (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED, - xmlHashTablePtr data) { + void *vdata) { + xmlHashTablePtr data = (xmlHashTablePtr) vdata; xmlHashFree(data, exsltSaxonFreeCompExprEntry); } @@ -299,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); diff --git a/python/libxslt.c b/python/libxslt.c index b1fb18de..6db61c5f 100644 --- a/python/libxslt.c +++ b/python/libxslt.c @@ -1127,10 +1127,10 @@ libxslt_xsltRegisterExtensionClass(PyObject *self ATTRIBUTE_UNUSED, Py_XINCREF(pyobj_c); ret = xsltRegisterExtModuleFull(ns_uri, - (xsltExtInitFunction) libxslt_xsltPythonExtModuleCtxtInit, - (xsltExtShutdownFunction) libxslt_xsltPythonExtModuleCtxtShutdown, - (xsltStyleExtInitFunction) libxslt_xsltPythonExtModuleStyleInit, - (xsltStyleExtShutdownFunction) libxslt_xsltPythonExtModuleStyleShutdown); + libxslt_xsltPythonExtModuleCtxtInit, + libxslt_xsltPythonExtModuleCtxtShutdown, + libxslt_xsltPythonExtModuleStyleInit, + libxslt_xsltPythonExtModuleStyleShutdown); py_retval = libxml_intWrap((int) ret); if (ret < 0) { Py_XDECREF(pyobj_c);