// Created: 20/07/98
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
CFragSymbolClass symClass;
Str255 symName;
-#if TARGET_CARBON
- c2pstrcpy( (StringPtr) symName, name );
-#else
- strcpy( (char *) symName, name );
- c2pstr( (char *) symName );
-#endif
+ wxMacStringToPascal( name.c_str() , symName ) ;
+
if( FindSymbol( ((CFragConnectionID)dllHandle), symName, &symAddress, &symClass ) == noErr )
symbol = (void *)symAddress;
return 0;
}
-void *dlsym(void *WXUNUSED(handle), const char *symbol)
+void *dlsym(void *handle, const char *symbol)
{
void *addr;
+
+ NSSymbol nsSymbol = NSLookupSymbolInModule( handle , symbol ) ;
- if (NSIsSymbolNameDefined(symbol)) {
- addr = NSAddressOfSymbol(NSLookupAndBindSymbol(symbol));
+ if ( nsSymbol)
+ {
+ addr = NSAddressOfSymbol(nsSymbol);
}
- else {
- addr = NULL;
+ else
+ {
+ addr = NULL;
}
return addr;
}