From: Václav Slavík Date: Tue, 19 Jun 2007 19:29:07 +0000 (+0000) Subject: return wxString from wxDynamicLibrary::GetDllExt() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/00711afdd67f3e804f00f44da1fc60d5904bb61e?ds=sidebyside return wxString from wxDynamicLibrary::GetDllExt() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dynlib.h b/include/wx/dynlib.h index 58c81afebd..4bd00cf0f9 100644 --- a/include/wx/dynlib.h +++ b/include/wx/dynlib.h @@ -170,7 +170,7 @@ public: static wxDllType GetProgramHandle(); // return the platform standard DLL extension (with leading dot) - static const wxChar *GetDllExt() { return ms_dllext; } + static const wxString& GetDllExt() { return ms_dllext; } wxDynamicLibrary() : m_handle(0) { } wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT) @@ -298,7 +298,7 @@ protected: // platform specific shared lib suffix. - static const wxChar *ms_dllext; + static const wxString ms_dllext; // the handle to DLL or NULL wxDllType m_handle; diff --git a/src/common/dynlib.cpp b/src/common/dynlib.cpp index ae754bc9c3..ff9c14648d 100644 --- a/src/common/dynlib.cpp +++ b/src/common/dynlib.cpp @@ -59,9 +59,9 @@ WX_DEFINE_USER_EXPORTED_OBJARRAY(wxDynamicLibraryDetailsArray) // --------------------------------------------------------------------------- #if defined(__WXPM__) || defined(__EMX__) - const wxChar *wxDynamicLibrary::ms_dllext = _T(".dll"); + const wxString wxDynamicLibrary::ms_dllext(_T(".dll")); #elif defined(__WXMAC__) && !defined(__DARWIN__) - const wxChar *wxDynamicLibrary::ms_dllext = wxEmptyString; + const wxString wxDynamicLibrary::ms_dllext; // empty string #endif // for MSW/Unix it is defined in platform-specific file diff --git a/src/msw/dlmsw.cpp b/src/msw/dlmsw.cpp index a0e6ab8e55..7faff796a5 100644 --- a/src/msw/dlmsw.cpp +++ b/src/msw/dlmsw.cpp @@ -28,7 +28,7 @@ #include "wx/msw/private.h" #include "wx/msw/debughlp.h" -const wxChar *wxDynamicLibrary::ms_dllext = _T(".dll"); +const wxString wxDynamicLibrary::ms_dllext(_T(".dll")); // ---------------------------------------------------------------------------- // private classes diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index 97d20f98ee..2c9fec3b3c 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -65,11 +65,11 @@ // standard shared libraries extensions for different Unix versions #if defined(__HPUX__) - const wxChar *wxDynamicLibrary::ms_dllext = _T(".sl"); + const wxString wxDynamicLibrary::ms_dllext(".sl"); #elif defined(__DARWIN__) - const wxChar *wxDynamicLibrary::ms_dllext = _T(".bundle"); + const wxString wxDynamicLibrary::ms_dllext(".bundle"); #else - const wxChar *wxDynamicLibrary::ms_dllext = _T(".so"); + const wxString wxDynamicLibrary::ms_dllext(".so"); #endif // ============================================================================