removed useless g_string(x) macro that cluttered the namespace and was
authorTim Janik <timj@gtk.org>
Thu, 14 Oct 1999 22:04:24 +0000 (22:04 +0000)
committerTim Janik <timj@src.gnome.org>
Thu, 14 Oct 1999 22:04:24 +0000 (22:04 +0000)
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.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
NEWS
glib.h
glib/glib.h

index 0d4652a..5502212 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
index 0d4652a..5502212 100644 (file)
@@ -1,3 +1,11 @@
+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.
+
 1999-10-12  Tor Lillqvist  <tml@iki.fi>
 
        * config.h.win32.in: Define the new GLIB_SIZEOF_* constants here,
diff --git a/NEWS b/NEWS
index 18531dc..022acd5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,7 +13,8 @@ What's new in GLib 1.3.1:
 * New thread-safe random number generator Mersenne Twister.
 * g_strcompress() added, g_strescape() had a slight API change, and
   more tightly defined semantics.
-
+* the g_string(x) macro has been removed, #x may be used instead.
+                                
 Overview of Changes in GLib 1.2.1:
 
 * g_realloc() fix for SunOS (please report further problems).
diff --git a/glib.h b/glib.h
index 1eac04a..d88cef6 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -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
index 1eac04a..d88cef6 100644 (file)
@@ -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