From: David Elliott Date: Mon, 4 Aug 2003 15:46:51 +0000 (+0000) Subject: Implement new static Unload(handle) instead of old Unload() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ff793cab3adf44df1059c771191222dde657913f?ds=sidebyside Implement new static Unload(handle) instead of old Unload() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 06432ca987..3ab2153462 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -300,25 +300,21 @@ bool wxDynamicLibrary::Load(wxString libname, int flags) return IsLoaded(); } -void wxDynamicLibrary::Unload() +/* static */ void wxDynamicLibrary::Unload(wxDllType handle) { - if( IsLoaded() ) - { #if defined(__WXPM__) || defined(__EMX__) - DosFreeModule( m_handle ); + DosFreeModule( handle ); #elif defined(HAVE_DLOPEN) || defined(__DARWIN__) - dlclose( m_handle ); + dlclose( handle ); #elif defined(HAVE_SHL_LOAD) - shl_unload( m_handle ); + shl_unload( handle ); #elif defined(__WINDOWS__) - ::FreeLibrary( m_handle ); + ::FreeLibrary( handle ); #elif defined(__WXMAC__) && !defined(__DARWIN__) - CloseConnection( (CFragConnectionID*) &m_handle ); + CloseConnection( (CFragConnectionID*) &handle ); #else #error "runtime shared lib support not implemented" #endif - m_handle = 0; - } } void *wxDynamicLibrary::GetSymbol(const wxString &name, bool *success) const