]> git.saurik.com Git - wxWidgets.git/commitdiff
backed out improper casts and corrected prototypes for Mac OS X
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Mon, 2 Apr 2001 20:22:05 +0000 (20:22 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Mon, 2 Apr 2001 20:22:05 +0000 (20:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9651 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dynlib.cpp

index d8b6551c67fcc2fca8a1a5fe305fe8b891ffc4a3..796231c31a802126e309007dba09f356c737742d 100644 (file)
             return (void *)0;
     }
 #elif defined(__APPLE__) && defined(__UNIX__)
-char *dlopen(char *path, int mode /* mode is ignored */);
-void *dlsym(void *handle, char *symbol);
+void *dlopen(const char *path, int mode /* mode is ignored */);
+void *dlsym(void *handle, const char *symbol);
 int   dlclose(void *handle);
-char *dlerror();
+const char *dlerror(void);
 
 #   define wxDllOpen(lib)                dlopen(lib.fn_str(), 0)
 #   define wxDllGetSymbol(handle, name)  dlsym(handle, name)
@@ -247,7 +247,7 @@ wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
     char zError[256] = "";
     wxDllOpen(zError, libname, handle);
 #else // !Mac
-    handle = wxDllOpen((char *)libname.c_str());
+    handle = wxDllOpen(libname);
 #endif // OS
 
     if ( !handle )
@@ -321,7 +321,7 @@ wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
     wxDllGetSymbol(dllHandle, symbol);
 #else
     // mb_str() is necessary in Unicode build
-    symbol = wxDllGetSymbol(dllHandle, (char *)name.mb_str());
+    symbol = wxDllGetSymbol(dllHandle, name.mb_str());
 #endif
 
     if ( !symbol )