]> git.saurik.com Git - wxWidgets.git/commitdiff
- wxDynamicLibrary::GetDllExt() now returns ".bundle", not ".dylib"
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Oct 2004 19:45:20 +0000 (19:45 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 17 Oct 2004 19:45:20 +0000 (19:45 +0000)
- wxDynamicLibrary::GetSymbol() now prepends underscore to the symbol name

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/common/dynlib.cpp

index 62a64151e4a1370006b7c11c94bb61ee2de5bedc..f591101f400e5a0f77fac5c53053c3d7d82f76cc 100644 (file)
@@ -214,6 +214,11 @@ Unix:
 
 - wxPuts() now correctly outputs trailing new line in Unicode build
 
+Mac:
+
+- wxDynamicLibrary::GetDllExt() now returns ".bundle", not ".dylib"
+- wxDynamicLibrary::GetSymbol() now prepends underscore to the symbol name
+
 wxGTK:
 
 - fixed wxFileDialog::SetWildcard()
index 95f14b9e21489322888c31eb9697d8b1209fd85e..ec3c14257053d9bd0e2e452b30ef8a2e1896c6f1 100644 (file)
@@ -126,19 +126,12 @@ int dlclose(void *handle)
 
 void *dlsym(void *handle, const char *symbol)
 {
-    void *addr;
-
-    NSSymbol nsSymbol = NSLookupSymbolInModule( handle , symbol ) ;
-
-    if ( nsSymbol)
-    {
-        addr = NSAddressOfSymbol(nsSymbol);
-    }
-    else
-    {
-        addr = NULL;
-    }
-    return addr;
+    // as on many other systems, C symbols have prepended underscores under
+    // Darwin but unlike the normal dlopen(), NSLookupSymbolInModule() is not
+    // aware of this
+    NSSymbol nsSymbol = NSLookupSymbolInModule( handle,
+                                                wxString(_T('_')) + symbol );
+    return nsSymbol ? NSAddressOfSymbol(nsSymbol) : NULL;
 }
 
 #endif // defined(__DARWIN__)
@@ -159,7 +152,7 @@ void *dlsym(void *handle, const char *symbol)
     #if defined(__HPUX__)
         const wxChar *wxDynamicLibrary::ms_dllext = _T(".sl");
     #elif defined(__DARWIN__)
-        const wxChar *wxDynamicLibrary::ms_dllext = _T(".dylib");
+        const wxChar *wxDynamicLibrary::ms_dllext = _T(".bundle");
     #else
         const wxChar *wxDynamicLibrary::ms_dllext = _T(".so");
     #endif