Commit 7bfc60de authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Deprecate G_GNUC_(PRETTY)_FUNCTION.

2008-01-27  Matthias Clasen  <mclasen@redhat.com>

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



svn path=/trunk/; revision=6389
parent 69c903e5
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
......
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
......
......@@ -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 ##### -->
......
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.
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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
......
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 ===
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment