fix Mac/Unicode build after last commit

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-18 22:26:24 +00:00
parent 2b27a03922
commit 3640d0da6b

View File

@@ -129,8 +129,12 @@ void *dlsym(void *handle, const char *symbol)
// 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 );
wxCharBuffer buf(strlen(symbol) + 1);
char *p = buf.data();
p[0] = '_';
strcpy(p + 1, symbol);
NSSymbol nsSymbol = NSLookupSymbolInModule( handle, p );
return nsSymbol ? NSAddressOfSymbol(nsSymbol) : NULL;
}