From 84206bbb3266e45837ce6e099b135a72d5389dc8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 8 Oct 2006 11:07:55 +0000 Subject: [PATCH] added Unicode-friendly wxSTRINGIZE_T() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41691 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/function.tex | 13 +++++++++++++ include/wx/cpp.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index bf4502d8a5..ad5237aaf4 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -246,6 +246,7 @@ the corresponding topic. \helpref{wxStripMenuCodes}{wxstripmenucodes}\\ \helpref{wxStrlen}{wxstrlen}\\ \helpref{wxSTRINGIZE}{wxstringize}\\ +\helpref{wxSTRINGIZE\_T}{wxstringizet}\\ \helpref{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{wxsuppressgccprivatedtorwarning}\\ \helpref{wxSysErrorCode}{wxsyserrorcode}\\ \helpref{wxSysErrorMsg}{wxsyserrormsg}\\ @@ -3280,11 +3281,23 @@ Returns the string representation of the given symbol which can be either a literal or a macro (hence the advantage of using this macro instead of the standard preprocessor \texttt{\#} operator which doesn't work with macros). +Notice that this macro always produces a \texttt{char} string, use +\helpref{wxSTRINGIZE\_T}{wxstringizet} to build a wide string Unicode build. + \wxheading{See also} \helpref{wxCONCAT}{wxconcat} +\membersection{wxSTRINGIZE\_T}\label{wxstringizet} + +\func{}{wxSTRINGIZE\_T}{\param{}{x}} + +Returns the string representation of the given symbol as either an ASCII or +Unicode string, depending on the current build. This is the Unicode-friendly +equivalent of \helpref{wxSTRINGIZE}{wxstringize}. + + \membersection{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}\label{wxsuppressgccprivatedtorwarning} \func{}{wxSUPPRESS\_GCC\_PRIVATE\_DTOR\_WARNING}{\param{}{name}} diff --git a/include/wx/cpp.h b/include/wx/cpp.h index 37c58706f8..6c93ca0ac9 100644 --- a/include/wx/cpp.h +++ b/include/wx/cpp.h @@ -21,6 +21,9 @@ #define wxSTRINGIZE_HELPER(x) #x #define wxSTRINGIZE(x) wxSTRINGIZE_HELPER(x) +/* a Unicode-friendly version of wxSTRINGIZE_T */ +#define wxSTRINGIZE_T(x) wxAPPLY_T(wxSTRINGIZE(x)) + /* Helper macros for wxMAKE_UNIQUE_NAME: normally this works by appending the current line number to the given identifier to reduce the probability of the -- 2.45.2