diff --git a/ChangeLog b/ChangeLog index 58f975de..7375a562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Jul 2 15:51:49 CEST 2004 Daniel Veillard + + * configure.in: convenience change + * python/libxsl.py python/libxslt-python-api.xml python/libxslt.c: + try to avoid calling libxml2 cleanup function directly but go + though the python wrapper of libxml2 for memory debug accounting. + Fri Jul 2 16:24:12 HKT 2004 William Brack * libxslt/keys.c: added namespace setup before calling XPath diff --git a/configure.in b/configure.in index 770cf3cc..5056c346 100644 --- a/configure.in +++ b/configure.in @@ -388,7 +388,7 @@ if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XSLT" ; then DV_LINK="1" XSLTPROCDV="xsltproc.dv" INSTALLED_XSLT_LIB="" - # PYTHONSODV="libxsltmod.so.dv" + LIBXML_SRC="../../XML/" fi WIN32_EXTRA_LIBADD= diff --git a/python/libxsl.py b/python/libxsl.py index aa0ba430..404b1dc3 100644 --- a/python/libxsl.py +++ b/python/libxsl.py @@ -84,6 +84,11 @@ class extensionModule: """Callback function when a transformation using it finishes""" pass +def cleanup(): + """Cleanup all libxslt and libxml2 memory allocated""" + libxsltmod.xsltPythonCleanup() + libxml2.cleanupParser() + # # Everything below this point is automatically generated # diff --git a/python/libxslt-python-api.xml b/python/libxslt-python-api.xml index 648f2614..a9e3d6aa 100644 --- a/python/libxslt-python-api.xml +++ b/python/libxslt-python-api.xml @@ -45,8 +45,8 @@ - - Cleanup all libxslt and libxml2 memory allocated + + Cleanup just libxslt (not libxml2) memory allocated diff --git a/python/libxslt.c b/python/libxslt.c index 78b4607d..6433626e 100644 --- a/python/libxslt.c +++ b/python/libxslt.c @@ -840,8 +840,8 @@ libxslt_xsltRegisterExtensionClass(PyObject *self ATTRIBUTE_UNUSED, ************************************************************************/ PyObject * -libxslt_xsltCleanup(PyObject *self ATTRIBUTE_UNUSED, - PyObject *args ATTRIBUTE_UNUSED) { +libxslt_xsltPythonCleanup(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args ATTRIBUTE_UNUSED) { if (libxslt_extModuleFunctions != NULL) { xmlHashFree(libxslt_extModuleFunctions, deallocateCallback); @@ -856,7 +856,6 @@ libxslt_xsltCleanup(PyObject *self ATTRIBUTE_UNUSED, xmlHashFree(libxslt_extModuleClasses, deallocateClasse); } xsltCleanupGlobals(); - xmlCleanupParser(); Py_INCREF(Py_None); return(Py_None); } diff --git a/python/libxsltclass.txt b/python/libxsltclass.txt index 3130df5e..0a344167 100644 --- a/python/libxsltclass.txt +++ b/python/libxsltclass.txt @@ -17,7 +17,7 @@ unregisterExtModuleTopLevel() registerAllExtras() # functions from module python -cleanup() +pythonCleanup() registerErrorHandler() registerExtModuleElement() registerExtModuleFunction()