diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-11-29 16:04:25 +0100 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-11-29 16:52:13 +0100 |
commit | 6a822a2c1a8d8a917ba4898ec65bfa90a4d42d54 (patch) | |
tree | 55b75dc6230047febfea77b61389c742eedd1d91 | |
parent | c32117ce26dd21c0e05439744e05573b4cc51f50 (diff) | |
download | libxslt-6a822a2c1a8d8a917ba4898ec65bfa90a4d42d54.tar.gz |
Fix deallocator signatures
-rw-r--r-- | libexslt/functions.c | 6 | ||||
-rw-r--r-- | libxslt/extensions.c | 8 | ||||
-rw-r--r-- | libxslt/pattern.c | 7 |
3 files changed, 16 insertions, 5 deletions
diff --git a/libexslt/functions.c b/libexslt/functions.c index 1711ca15..88356348 100644 --- a/libexslt/functions.c +++ b/libexslt/functions.c @@ -262,7 +262,9 @@ exsltFuncNewFunctionData (void) { * Deallocates an #exsltFuncResultPreComp */ static void -exsltFreeFuncResultPreComp (exsltFuncResultPreComp *comp) { +exsltFreeFuncResultPreComp (xsltElemPreCompPtr ecomp) { + exsltFuncResultPreComp *comp = (exsltFuncResultPreComp *) ecomp; + if (comp == NULL) return; @@ -648,7 +650,7 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst, memset(ret, 0, sizeof(exsltFuncResultPreComp)); xsltInitElemPreComp ((xsltElemPreCompPtr) ret, style, inst, function, - (xsltElemPreCompDeallocator) exsltFreeFuncResultPreComp); + exsltFreeFuncResultPreComp); ret->select = NULL; /* diff --git a/libxslt/extensions.c b/libxslt/extensions.c index b38f0189..26f9ad04 100644 --- a/libxslt/extensions.c +++ b/libxslt/extensions.c @@ -1501,6 +1501,11 @@ xsltUnregisterAllExtModuleFunction(void) } +static void +xsltFreeElemPreComp(xsltElemPreCompPtr comp) { + xmlFree(comp); +} + /** * xsltNewElemPreComp: * @style: the XSLT stylesheet @@ -1525,8 +1530,7 @@ xsltNewElemPreComp(xsltStylesheetPtr style, xmlNodePtr inst, } memset(cur, 0, sizeof(xsltElemPreComp)); - xsltInitElemPreComp(cur, style, inst, function, - (xsltElemPreCompDeallocator) xmlFree); + xsltInitElemPreComp(cur, style, inst, function, xsltFreeElemPreComp); return (cur); } diff --git a/libxslt/pattern.c b/libxslt/pattern.c index 9a970705..07f11f9b 100644 --- a/libxslt/pattern.c +++ b/libxslt/pattern.c @@ -519,6 +519,11 @@ xsltPatPushState(xsltTransformContextPtr ctxt, xsltStepStates *states, return(0); } +static void +xmlXPathFreeObjectWrapper(void *obj) { + xmlXPathFreeObject((xmlXPathObjectPtr) obj); +} + /** * xsltTestCompMatchDirect: * @ctxt: a XSLT process context @@ -604,7 +609,7 @@ xsltTestCompMatchDirect(xsltTransformContextPtr ctxt, xsltCompMatchPtr comp, XSLT_RUNTIME_EXTRA(ctxt, sel->indexExtra, ival) = 0; XSLT_RUNTIME_EXTRA_FREE(ctxt, sel->lenExtra) = - (xmlFreeFunc) xmlXPathFreeObject; + xmlXPathFreeObjectWrapper; } else list = newlist; } |