glib r6389 - in trunk: . docs/reference docs/reference/glib/tmpl gio glib gthread



Author: matthiasc
Date: Sun Jan 27 23:42:33 2008
New Revision: 6389
URL: http://svn.gnome.org/viewvc/glib?rev=6389&view=rev

Log:
2008-01-27  Matthias Clasen  <mclasen redhat com>

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




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

Modified: trunk/docs/reference/glib/tmpl/macros_misc.sgml
==============================================================================
--- trunk/docs/reference/glib/tmpl/macros_misc.sgml	(original)
+++ trunk/docs/reference/glib/tmpl/macros_misc.sgml	Sun Jan 27 23:42:33 2008
@@ -264,25 +264,21 @@
 
 <!-- ##### 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 ##### -->

Modified: trunk/gio/gbufferedinputstream.c
==============================================================================
--- trunk/gio/gbufferedinputstream.c	(original)
+++ trunk/gio/gbufferedinputstream.c	Sun Jan 27 23:42:33 2008
@@ -481,7 +481,7 @@
 					   user_data,
 					   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
 					   _("Too large count value passed to %s"),
-					   G_GNUC_PRETTY_FUNCTION);
+					   __FUNCTION__);
       return;
     }
   

Modified: trunk/gio/ginputstream.c
==============================================================================
--- trunk/gio/ginputstream.c	(original)
+++ trunk/gio/ginputstream.c	Sun Jan 27 23:42:33 2008
@@ -183,8 +183,7 @@
   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 @@
   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 @@
 					   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 @@
 					   user_data,
 					   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
 					   _("Too large count value passed to %s"),
-					   G_GNUC_PRETTY_FUNCTION);
+					   __FUNCTION__);
       return;
     }
 

Modified: trunk/gio/goutputstream.c
==============================================================================
--- trunk/gio/goutputstream.c	(original)
+++ trunk/gio/goutputstream.c	Sun Jan 27 23:42:33 2008
@@ -190,8 +190,7 @@
   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 @@
 					   user_data,
 					   G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
 					   _("Too large count value passed to %s"),
-					   G_GNUC_PRETTY_FUNCTION);
+					   __FUNCTION__);
       return;
     }
 

Modified: trunk/glib/gmacros.h
==============================================================================
--- trunk/glib/gmacros.h	(original)
+++ trunk/glib/gmacros.h	Sun Jan 27 23:42:33 2008
@@ -108,6 +108,7 @@
 #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
@@ -119,6 +120,7 @@
 #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

Modified: trunk/gthread/gthread-posix.c
==============================================================================
--- trunk/gthread/gthread-posix.c	(original)
+++ trunk/gthread/gthread-posix.c	Sun Jan 27 23:42:33 2008
@@ -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
 

Modified: trunk/gthread/gthread-win32.c
==============================================================================
--- trunk/gthread/gthread-win32.c	(original)
+++ trunk/gthread/gthread-win32.c	Sun Jan 27 23:42:33 2008
@@ -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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]