From 74be7431f33dd73780641ecfd66d8308b0feb0c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Fri, 29 Sep 2006 12:37:31 +0000 Subject: [PATCH] moved wxSTRINGIZE to defs.h and made it work with macro argument, so that it can be used elsewhere git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/defs.h | 17 +++++++++++++---- include/wx/version.h | 1 - 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index 18d47edfb5..3ee686863d 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -127,6 +127,19 @@ # define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) #endif +/* ---------------------------------------------------------------------------- */ +/* string manipulation helpers */ +/* ---------------------------------------------------------------------------- */ + +/* helper macros to concatenate two tokens together */ +#define wxCONCAT_HELPER(text, line) text ## line +#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line) + +/* helper macros to convert a token into string literal */ +#define wxSTRINGIZE_HELPER(x) #x +#define wxSTRINGIZE(x) wxSTRINGIZE_HELPER(x) + + /* ---------------------------------------------------------------------------- */ /* wxWidgets version and compatibility defines */ /* ---------------------------------------------------------------------------- */ @@ -546,10 +559,6 @@ typedef int wxWindowID; /* size of statically declared array */ #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) -/* helper macros to concatenate two tokens together */ -#define wxCONCAT_HELPER(text, line) text ## line -#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line) - /* helper macros to be able to define unique/anonymous objects: this works by */ /* appending the current line number to the given identifier to reduce the */ /* probability of the conflict (it may still happen if this is used in the */ diff --git a/include/wx/version.h b/include/wx/version.h index eecf8512e8..9daf38f9d8 100644 --- a/include/wx/version.h +++ b/include/wx/version.h @@ -44,7 +44,6 @@ #endif /* helpers for wxVERSION_NUM_XXX */ -#define wxSTRINGIZE(x) #x #define wxMAKE_VERSION_STRING(x, y, z) \ wxSTRINGIZE(x) wxSTRINGIZE(y) wxSTRINGIZE(z) #define wxMAKE_VERSION_DOT_STRING(x, y, z) \ -- 2.45.2