Deprecate G_GNUC_(PRETTY)_FUNCTION.
authorMatthias Clasen <mclasen@redhat.com>
Sun, 27 Jan 2008 23:42:33 +0000 (23:42 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 27 Jan 2008 23:42:33 +0000 (23:42 +0000)
2008-01-27  Matthias Clasen  <mclasen@redhat.com>

        * glib/gmacros.h: Deprecate G_GNUC_(PRETTY)_FUNCTION.

svn path=/trunk/; revision=6389

ChangeLog
docs/reference/ChangeLog
docs/reference/glib/tmpl/macros_misc.sgml
gio/ChangeLog
gio/gbufferedinputstream.c
gio/ginputstream.c
gio/goutputstream.c
glib/gmacros.h
gthread/ChangeLog
gthread/gthread-posix.c
gthread/gthread-win32.c

index 41bf86f5550a1ea1152c34254cdf6336dfd42980..cd77c7be3927085c608359c245290effb81b2c1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/gmacros.h: Deprecate G_GNUC_(PRETTY)_FUNCTION.
+
 2008-01-27  Matthias Clasen  <mclasen@redhat.com>
 
        * m4macros/glib-gettext.m4: Remove AC_CANONICAL_HOST from
index c830fef1019809f28b55a7bb0110374db837e8a4..db7b5a0523d87d939d5a59e6eb715cd18ee1b25a 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/tmpl/macros_misc.sgml: Document G_GNUC_(PRETTY)_FUNCTION
+       as deprecated.
+
 2008-01-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gio/migration.xml: Some more
index 22ab7693ba55178e8ac59b93fec1737a4da67f51..dc9d7686d5fc916ce0bb9ae2d4e01fec3cbb470b 100644 (file)
@@ -264,25 +264,21 @@ is ignored. See the GNU C documentation for details.
 
 <!-- ##### MACRO G_GNUC_FUNCTION ##### -->
 <para>
-Expands to the GNU C <literal>__FUNCTION__</literal> variable if the 
-compiler is <command>gcc</command>, or "" if it isn't. The GNU C 
-<literal>__FUNCTION__</literal> variable contains the name of the 
-current function. See the GNU C documentation for details. 
+Expands to "" on all modern compilers, and to <literal>__FUNCTION__</literal>
+on <command>gcc</command> version 2.x. Don't use it.
 </para>
 
+@Deprecated: 2.14
 
 
 <!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
 <para>
-Expands to the GNU C <literal>__PRETTY_FUNCTION__</literal> variable 
-if the compiler is <command>gcc</command>, or "" if it isn't.
-The GNU C <literal>__PRETTY_FUNCTION__</literal> variable contains the 
-name of the current function. For a C program this is the same as the 
-<literal>__FUNCTION__</literal> variable but for C++ it also includes 
-extra information such as the class and function prototype. See the 
-GNU C documentation for details. 
+Expands to "" on all modern compilers, and to 
+<literal>__PRETTY_FUNCTION__</literal> on <command>gcc</command> version 2.x. 
+Don't use it.
 </para>
 
+@Deprecated: 2.14
 
 
 <!-- ##### MACRO G_GNUC_NO_INSTRUMENT ##### -->
index 54a4363946326fa6b32809cbd0a280c9de04e8b7..42d2d7312069df420893bf1c60739935c0912e4a 100644 (file)
@@ -1,3 +1,10 @@
+2008-01-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gbufferedinputstream.c:
+       * ginputstream.c:
+       * goutputstream.c: Replace uses of G_GNUC_PRETTY_FUNCTION by
+       __FUNCTION__.
+       
 2008-01-27  Matthias Clasen  <mclasen@redhat.com>
 
        * glocalfile.c: Avoid trivial differences in translatable strings.
index f011be5897acf5d31881990bf2b8bf09b731e2d1..ad00c69f2f000ce8a35da34ad2c3c2bc93c811aa 100644 (file)
@@ -481,7 +481,7 @@ g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
                                           user_data,
                                           G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                                           _("Too large count value passed to %s"),
-                                          G_GNUC_PRETTY_FUNCTION);
+                                          __FUNCTION__);
       return;
     }
   
index 5c0da376694bc97311faf49b47ad222b45833a3a..3e4d24cb59c0037bdd0a9445c3b1feb962adcb8a 100644 (file)
@@ -183,8 +183,7 @@ g_input_stream_read  (GInputStream  *stream,
   if (((gssize) count) < 0)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-                  _("Too large count value passed to %s"), 
-                   G_GNUC_PRETTY_FUNCTION);
+                  _("Too large count value passed to %s"), __FUNCTION__);
       return -1;
     }
 
@@ -316,8 +315,7 @@ g_input_stream_skip (GInputStream  *stream,
   if (((gssize) count) < 0)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-                  _("Too large count value passed to %s"),
-                  G_GNUC_PRETTY_FUNCTION);
+                  _("Too large count value passed to %s"), __FUNCTION__);
       return -1;
     }
   
@@ -559,7 +557,7 @@ g_input_stream_read_async (GInputStream        *stream,
                                           user_data,
                                           G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                                           _("Too large count value passed to %s"),
-                                          G_GNUC_PRETTY_FUNCTION);
+                                          __FUNCTION__);
       return;
     }
 
@@ -684,7 +682,7 @@ g_input_stream_skip_async (GInputStream        *stream,
                                           user_data,
                                           G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                                           _("Too large count value passed to %s"),
-                                          G_GNUC_PRETTY_FUNCTION);
+                                          __FUNCTION__);
       return;
     }
 
index c1bb8b20bbf03a0562a117309f794fad94b929b1..6f8a95c10620acd80378f5fcedcaf74c28a157ee 100644 (file)
@@ -190,8 +190,7 @@ g_output_stream_write (GOutputStream  *stream,
   if (((gssize) count) < 0)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
-                  _("Too large count value passed to %s"),
-                  G_GNUC_PRETTY_FUNCTION);
+                  _("Too large count value passed to %s"), __FUNCTION__);
       return -1;
     }
 
@@ -646,7 +645,7 @@ g_output_stream_write_async (GOutputStream       *stream,
                                           user_data,
                                           G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
                                           _("Too large count value passed to %s"),
-                                          G_GNUC_PRETTY_FUNCTION);
+                                          __FUNCTION__);
       return;
     }
 
index 7c9c87e8961aa05000b42d44427a8196a14bb8d5..eb6b02c50935643cb7fe698c1a07c29809032fd6 100644 (file)
 #define G_GNUC_WARN_UNUSED_RESULT
 #endif /* __GNUC__ */
 
+#ifndef G_DISABLE_DEPRECATED
 /* 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
 #define G_GNUC_FUNCTION         ""
 #define G_GNUC_PRETTY_FUNCTION  ""
 #endif  /* !__GNUC__ */
+#endif  /* !G_DISABLE_DEPRECATED */
 
 #define G_STRINGIFY(macro_or_string)   G_STRINGIFY_ARG (macro_or_string)
 #define        G_STRINGIFY_ARG(contents)       #contents
index 6bc7d1ca528986af0d904ca1619d25e0bd5d8a12..2d134f4e0b1e8387514de5cdf9b890cdd9bae992 100644 (file)
@@ -1,3 +1,9 @@
+2008-01-27  Matthias Clasen  <mclasen@redhat.com>
+
+       * gthread-posix.c:
+       * gthread-win32.c: Replace uses of G_GNUC_PRETTY_FUNCTION
+       by __FUNCTION__.
+
 2008-01-21  Matthias Clasen  <mclasen@redhat.com>
 
        * === Released 2.15.3 ===
index 01121bf4c05229bb0d0a069f53093d19b0fb8ae4..0891bf2bd22d10a315b8437154268e92be221fe1 100644 (file)
@@ -51,7 +51,7 @@
   int error = (err);                                                   \
   if (error)                                                           \
     g_error ("file %s: line %d (%s): error '%s' during '%s'",          \
-           __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION,                 \
+           __FILE__, __LINE__, __FUNCTION__,                           \
            g_strerror (error), name);                                  \
   }G_STMT_END
 
index 657423f449e174063e4233c1971ce0c9daa91d0d..f566e28583fe13515f78377b19ff62c466f986dd 100644 (file)
@@ -48,7 +48,7 @@
 #define win32_check_for_error(what) G_STMT_START{                      \
   if (!(what))                                                         \
     g_error ("file %s: line %d (%s): error %s during %s",              \
-            __FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION,                \
+            __FILE__, __LINE__, __FUNCTION__,                          \
             g_win32_error_message (GetLastError ()), #what);           \
   }G_STMT_END