mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
applied an old patch from Lukas Schroeder to track node creation and
* global.data globals.c tree.c include/libxml/globals.h: applied an old patch from Lukas Schroeder to track node creation and destruction. Probably missing a lot of references at the moment and not usable reliably. Daniel
This commit is contained in:
@@ -52,6 +52,11 @@ extern "C" {
|
||||
#undef xmlRealloc
|
||||
#undef xmlSaveNoEmptyTags
|
||||
#undef xmlSubstituteEntitiesDefaultValue
|
||||
#undef xmlRegisterNodeDefaultValue
|
||||
#undef xmlDeregisterNodeDefaultValue
|
||||
|
||||
typedef void (*xmlRegisterNodeFunc)(xmlNodePtr node);
|
||||
typedef void (*xmlDeregisterNodeFunc)(xmlNodePtr node);
|
||||
|
||||
typedef struct _xmlGlobalState xmlGlobalState;
|
||||
typedef xmlGlobalState *xmlGlobalStatePtr;
|
||||
@@ -89,6 +94,9 @@ struct _xmlGlobalState
|
||||
int xmlSaveNoEmptyTags;
|
||||
int xmlIndentTreeOutput;
|
||||
const char *xmlTreeIndentString;
|
||||
|
||||
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -101,6 +109,9 @@ extern "C" {
|
||||
|
||||
void xmlInitializeGlobalState(xmlGlobalStatePtr gs);
|
||||
|
||||
xmlRegisterNodeFunc xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
|
||||
xmlDeregisterNodeFunc xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
/*
|
||||
* In general the memory allocation entry points are not kept
|
||||
* thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
|
||||
@@ -329,6 +340,22 @@ extern int *__xmlSubstituteEntitiesDefaultValue(void);
|
||||
LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
|
||||
#endif
|
||||
|
||||
extern xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlRegisterNodeDefaultValue \
|
||||
(*(__xmlRegisterNodeDefaultValue()))
|
||||
#else
|
||||
LIBXML_DLL_IMPORT extern xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
extern xmlDeregisterNodeFunc *__xmlDeregisterNodeDefaultValue(void);
|
||||
#ifdef LIBXML_THREAD_ENABLED
|
||||
#define xmlDeregisterNodeDefaultValue \
|
||||
(*(__xmlDeregisterNodeDefaultValue()))
|
||||
#else
|
||||
LIBXML_DLL_IMPORT extern xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user