This repository was archived by the owner on Jan 26, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -598,11 +598,11 @@ xmlInitGlobalState(xmlGlobalStatePtr gs) {
598598
599599#ifdef LIBXML_THREAD_ALLOC_ENABLED
600600 /* XML_GLOBALS_ALLOC */
601- gs -> gs_xmlFree = free ;
602- gs -> gs_xmlMalloc = malloc ;
603- gs -> gs_xmlMallocAtomic = malloc ;
604- gs -> gs_xmlRealloc = realloc ;
605- gs -> gs_xmlMemStrdup = xmlPosixStrdup ;
601+ gs -> free = free ;
602+ gs -> malloc = malloc ;
603+ gs -> mallocAtomic = malloc ;
604+ gs -> realloc = realloc ;
605+ gs -> memStrdup = xmlPosixStrdup ;
606606#endif
607607
608608 xmlMutexLock (& xmlThrDefMutex );
@@ -754,6 +754,33 @@ __xmlOutputBufferCreateFilenameValue(void) {
754754 return (& xmlGetThreadLocalStorage (0 )-> outputBufferCreateFilenameValue );
755755}
756756
757+ #ifdef LIBXML_THREAD_ALLOC_ENABLED
758+ xmlMallocFunc *
759+ __xmlMalloc (void ) {
760+ return (& xmlGetThreadLocalStorage (0 )-> malloc );
761+ }
762+
763+ xmlMallocFunc *
764+ __xmlMallocAtomic (void ) {
765+ return (& xmlGetThreadLocalStorage (0 )-> mallocAtomic );
766+ }
767+
768+ xmlReallocFunc *
769+ __xmlRealloc (void ) {
770+ return (& xmlGetThreadLocalStorage (0 )-> realloc );
771+ }
772+
773+ xmlFreeFunc *
774+ __xmlFree (void ) {
775+ return (& xmlGetThreadLocalStorage (0 )-> free );
776+ }
777+
778+ xmlStrdupFunc *
779+ __xmlMemStrdup (void ) {
780+ return (& xmlGetThreadLocalStorage (0 )-> memStrdup );
781+ }
782+ #endif /* LIBXML_THREAD_ALLOC_ENABLED */
783+
757784/**
758785 * xmlGetLocalRngState:
759786 *
You can’t perform that action at this time.
0 commit comments