• Show log

    Commit

  • Hash : e7b6ca15
    Author : Nick Wellnhofer
    Date : 2023-09-18T13:25:06

    globals: Rework global state destruction on Windows
    
    If DllMain is used, rely on it working as expected. The old code seemed
    to attempt to free global state of other threads if, for some reason,
    the DllMain mechanism didn't work.
    
    In a static build, register a destructor with
    RegisterWaitForSingleObject.
    
    Make public functions xmlGetGlobalState and xmlInitializeGlobalState
    no-ops.
    
    Move initialization and registration of global state objects to
    xmlInitGlobalState. Lookup global state with xmlGetThreadLocalStorage
    which can be inlined nicely.
    
    Also cleanup global state when using TLS. xmlLastError must be reset.