Define G_GNUC_NULL_TERMINATED. (#164706, Marc Meissner)

2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* glib/gmacros.h: Define G_GNUC_NULL_TERMINATED.
	(#164706, Marc Meissner)

	* glib/gstrfuncs.h:
	* glib/gfileutils.h: Use G_GNUC_NULL_TERMINATED where
	appropriate.
This commit is contained in:
Matthias Clasen
2005-03-08 05:41:45 +00:00
committed by Matthias Clasen
parent 0fa2c2b366
commit 6aac5ce82c
12 changed files with 64 additions and 9 deletions

View File

@@ -1,3 +1,8 @@
2005-03-08 Matthias Clasen <mclasen@redhat.com>
* glib/glib-sections.txt:
* glib/tmpl/macros_misc.sgml: Document G_GNUC_NULL_TERMINATED.
2005-03-07 Matthias Clasen <mclasen@redhat.com>
* gobject/tmpl/gtype.sgml:

View File

@@ -322,6 +322,7 @@ G_GNUC_UNUSED
G_GNUC_PRINTF
G_GNUC_SCANF
G_GNUC_FORMAT
G_GNUC_NULL_TERMINATED
G_GNUC_FUNCTION
G_GNUC_PRETTY_FUNCTION
G_GNUC_NO_INSTRUMENT

View File

@@ -227,6 +227,17 @@ gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
@arg_idx: the index of the argument.
<!-- ##### MACRO G_GNUC_NULL_TERMINATED ##### -->
<para>
Expands to the GNU C <literal>sentinel</literal> function attribute if the
compiler is <command>gcc</command>, or "" if it isn't. This function attribute
only applies to variadic functions and instructs the compiler to check that
the argument list is terminated with an explicit %NULL.
See the GNU C documentation for details.
</para>
Since: 2.8
<!-- ##### MACRO G_GNUC_FUNCTION ##### -->
<para>
Expands to the GNU C <literal>__FUNCTION__</literal> variable if the