1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-08-05 23:35:48 +03:00

quick cleanup of memory allocations, raise a bug in the test suite, also

* libxslt/extensions.c xsltproc/xsltproc.c: quick cleanup
  of memory allocations, raise a bug in the test suite, also
  need to be centralized as a single cleanup function.
daniel
This commit is contained in:
Daniel Veillard
2001-07-26 22:33:58 +00:00
parent cca684b247
commit 0b3921b2ed
3 changed files with 42 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
Fri Jul 27 12:33:52 EDT 2001 Daniel Veillard <daniel@veillard.com>
* libxslt/extensions.c xsltproc/xsltproc.c: quick cleanup
of memory allocations, raise a bug in the test suite, also
need to be centralized as a single cleanup function.
Fri Jul 27 10:50:39 EDT 2001 Daniel Veillard <daniel@veillard.com>
* libxslt/transform.[ch]: applied changes from Tom Moog #58002

View File

@@ -943,6 +943,17 @@ xsltUnregisterExtModuleFunction (const xmlChar *name,
return xmlHashRemoveEntry2 (xsltFunctionsHash, name, URI, NULL);
}
/**
* xsltUnregisterAllExtModuleFunction:
*
* Unregisters all extension module function
*/
void
xsltUnregisterAllExtModuleFunction (void) {
xmlHashFree(xsltFunctionsHash, NULL);
xsltFunctionsHash = NULL;
}
/**
* xsltRegisterExtModuleElement:
* @name: the element name
@@ -1072,6 +1083,17 @@ xsltUnregisterExtModuleElement (const xmlChar *name,
(xmlHashDeallocator) xsltFreeExtElement);
}
/**
* xsltUnregisterAllExtModuleElement:
*
* Unregisters all extension module element
*/
void
xsltUnregisterAllExtModuleElement (void) {
xmlHashFree(xsltElementsHash, (xmlHashDeallocator) xsltFreeExtElement);
xsltElementsHash = NULL;
}
/**
* xsltRegisterExtModuleTopLevel:
* @name: the top-level element name
@@ -1135,6 +1157,17 @@ xsltUnregisterExtModuleTopLevel (const xmlChar *name,
return xmlHashRemoveEntry2 (xsltTopLevelsHash, name, URI, NULL);
}
/**
* xsltUnregisterAllExtModuleTopLevel:
*
* Unregisters all extension module function
*/
void
xsltUnregisterAllExtModuleTopLevel (void) {
xmlHashFree(xsltTopLevelsHash, NULL);
xsltTopLevelsHash = NULL;
}
/************************************************************************
* *

View File

@@ -506,6 +506,9 @@ main(int argc, char **argv)
xsltFreeStylesheet(cur);
}
xsltUnregisterAllExtModules();
xsltUnregisterAllExtModuleFunction();
xsltUnregisterAllExtModuleElement();
xsltUnregisterAllExtModuleTopLevel();
xmlCleanupParser();
xmlMemoryDump();
return (0);