+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
+Thu Nov 27 17:04:08 2003 Tim Janik <timj@gtk.org>
+
+ * glib/gstrfuncs.c (g_strconcat): handle NULL arguments
+ gracefully.
+
+ * glib/gmacros.h: defined G_STRFUNC, which (pretty) prints the
+ current function (since G_STRLOC and G_GNUC_*FUNCTION became
+ unusable with gcc-3.0).
+
Wed Nov 26 16:45:16 2003 Roozbeh Pournader <roozbeh@sharif.edu>
* glib/gstrfuncs.c: Fixed a bad pointer comparison in
/* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
* macros, so we can refer to them as strings unconditionally.
+ * usage not-recommended since gcc-3.0
*/
#if defined (__GNUC__) && (__GNUC__ < 3)
#define G_GNUC_FUNCTION __FUNCTION__
# define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__)
#endif
+/* Provide a string identifying the current function, non-concatenatable */
+#if defined (__GNUC__)
+# define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
+#elif defined (G_HAVE_ISO_VARARGS)
+# define G_STRFUNC ((const char*) (__func__))
+#elif
+# define G_STRFUNC ((const char*) ("???"))
+#endif
+
/* Guard C code in headers, while including them from C++ */
#ifdef __cplusplus
# define G_BEGIN_DECLS extern "C" {
gchar *concat;
gchar *ptr;
- g_return_val_if_fail (string1 != NULL, NULL);
+ if (!string1)
+ return NULL;
l = 1 + strlen (string1);
va_start (args, string1);