mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-18 03:12:52 +02:00
removed useless g_string(x) macro that cluttered the namespace and was
Tue Oct 12 14:17:12 1999 Tim Janik <timj@gtk.org> * glib.h: removed useless g_string(x) macro that cluttered the namespace and was just a poor wrapper around the cpp '#' symbol, use #x if you need to work around this. added new macro G_STRINGIFY(arg) that will convert arg to a string, no matter whether it contains macros or not.
This commit is contained in:
@@ -131,6 +131,9 @@ extern "C" {
|
||||
#undef CLAMP
|
||||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
||||
|
||||
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
|
||||
#define G_STRINGIFY_ARG(contents) #contents
|
||||
|
||||
|
||||
/* Define G_VA_COPY() to do the right thing for copying va_list variables.
|
||||
* glibconfig.h may have already defined G_VA_COPY as va_copy or __va_copy.
|
||||
@@ -326,9 +329,6 @@ extern "C" {
|
||||
} G_STMT_END
|
||||
|
||||
|
||||
#define g_string(x) #x
|
||||
|
||||
|
||||
/* Provide macros for error handling. The "assert" macros will
|
||||
* exit on failure. The "return" macros will exit the current
|
||||
* function. Two different definitions are given for the macros
|
||||
|
Reference in New Issue
Block a user