1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-27 03:21:26 +03:00

Move xmlCleanupGlobals to non-generated section

The bottom of the file was generated by build_glob.py. The generator
script needs some updates, but might still be useful.
This commit is contained in:
Nick Wellnhofer 2022-03-02 02:14:39 +01:00
parent 5ec1ef1ca5
commit 5dcfbc4900

View File

@ -561,6 +561,22 @@ xmlInitializeGlobalState(xmlGlobalStatePtr gs)
xmlMutexUnlock(xmlThrDefMutex);
}
/**
* xmlCleanupGlobals:
*
* Additional cleanup for multi-threading
*/
void xmlCleanupGlobals(void)
{
xmlResetError(&xmlLastError);
if (xmlThrDefMutex != NULL) {
xmlFreeMutex(xmlThrDefMutex);
xmlThrDefMutex = NULL;
}
__xmlGlobalInitMutexDestroy();
}
/**
* DOC_DISABLE : we ignore missing doc for the xmlThrDef functions,
* those are really internal work
@ -1106,19 +1122,3 @@ __xmlOutputBufferCreateFilenameValue(void) {
return (&xmlGetGlobalState()->xmlOutputBufferCreateFilenameValue);
}
/**
* xmlCleanupGlobals:
*
* Additional cleanup for multi-threading
*/
void xmlCleanupGlobals(void)
{
xmlResetError(&xmlLastError);
if (xmlThrDefMutex != NULL) {
xmlFreeMutex(xmlThrDefMutex);
xmlThrDefMutex = NULL;
}
__xmlGlobalInitMutexDestroy();
}