X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3f6cbd99cd7c5b86742d56114b21da5b34a5c74..9aee0061fe0efe24cc3ece104a9370599086ea04:/include/wx/strvararg.h diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index 290614c863..6ad650be85 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -89,27 +89,11 @@ struct wxArgNormalizer // special cases for converting strings: -// FIXME-UTF8: move this to chartype.h! -#if wxUSE_UNICODE - /* for now, all Unicode builds are wchar_t* based: */ - #define wxUSE_UNICODE_WCHAR 1 -#else - #define wxUSE_UNICODE_WCHAR 0 -#endif - -// FIXME-UTF8: include wx/chartype.h and use wxChar after headers split -// FIXME-UTF8: this will be char* in UTF-8 build and wchar_t* on Windows -#if wxUSE_UNICODE_WCHAR - typedef wchar_t wxArgNativeCharType; -#else - typedef char wxArgNativeCharType; -#endif - template<> struct WXDLLIMPEXP_BASE wxArgNormalizer { wxArgNormalizer(const wxCStrData& value) : m_value(value) {} - const wxArgNativeCharType *get() const; + const wxStringCharType *get() const; const wxCStrData& m_value; }; @@ -125,7 +109,7 @@ template<> struct WXDLLIMPEXP_BASE wxArgNormalizer { wxArgNormalizer(const wxString& value) : m_value(value) {} - const wxArgNativeCharType *get() const; + const wxStringCharType *get() const; const wxString& m_value; }; @@ -177,6 +161,23 @@ struct wxArgNormalizer : public wxArgNormalizer #endif // wxUSE_UNICODE_WCHAR / !wxUSE_UNICODE_WCHAR && wxUSE_WCHAR_T +// versions for passing wx[W]CharBuffer: +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizer + : public wxArgNormalizer +{ + wxArgNormalizer(const wxCharBuffer& buf); +}; + +template<> +struct WXDLLIMPEXP_BASE wxArgNormalizer + : public wxArgNormalizer +{ + wxArgNormalizer(const wxWCharBuffer& buf); +}; + + + // NB: The vararg emulation code is limited to 30 arguments at the moment. // If you need more, you need to // 1) increase the value of _WX_VARARG_MAX_ARGS