X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/481fcc780da6b3ddbee3bd9f1eca5aafeef0a58b..9b69526274b023fa1460b29a92bea8bf82e4703f:/src/common/dynlib.cpp diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index 996c2cf38b..6dd93ebcdc 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -38,6 +38,10 @@ #include "wx/intl.h" #include "wx/log.h" +#if defined(__WXMAC__) + #include "wx/mac/private.h" +#endif + // ---------------------------------------------------------------------------- // conditional compilation // ---------------------------------------------------------------------------- @@ -105,7 +109,7 @@ const char *dlerror(void); # define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name) # define wxDllClose ::FreeLibrary #elif defined(__WXMAC__) -# define wxDllClose(handle) CloseConnection(&handle) +# define wxDllClose(handle) CloseConnection(&((CFragConnectionID)handle)) #else # error "Don't know how to load shared libraries on this platform." #endif // OS @@ -207,6 +211,8 @@ const wxString wxDllLoader::ms_dllext( _T(".sl") ); #else const wxString wxDllLoader::ms_dllext( _T(".so") ); #endif +#elif defined(__WXMAC__) +const wxString wxDllLoader::ms_dllext( _T("") ); #endif /* static */ @@ -242,7 +248,7 @@ wxDllType wxDllLoader::LoadLibrary(const wxString & libname, bool *success) kCFragGoesToEOF, "\p", kPrivateCFragCopy, - &handle, + &((CFragConnectionID)handle), &myMainAddr, myErrName ) != noErr ) { @@ -310,7 +316,7 @@ void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *su strcpy( (char *) symName, name ); c2pstr( (char *) symName ); #endif - if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr ) + if( FindSymbol( ((CFragConnectionID)dllHandle), symName, &symAddress, &symClass ) == noErr ) symbol = (void *)symAddress; #elif defined(__WXPM__) || defined(__EMX__)