- wxDynamicLibrary::GetDllExt() now returns ".bundle", not ".dylib"

- 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
This commit is contained in:
Vadim Zeitlin
2004-10-17 19:45:20 +00:00
parent bf9848e73d
commit 42a2452301
2 changed files with 12 additions and 14 deletions

View 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