mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 15:06:14 +01:00
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:
parent
0fa2c2b366
commit
6aac5ce82c
@ -1,5 +1,12 @@
|
||||
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.
|
||||
|
||||
* glib/goption.c (parse_int): Fix an error message.
|
||||
(#168751, Hazael Maldonado Torres)
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
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.
|
||||
|
||||
* glib/goption.c (parse_int): Fix an error message.
|
||||
(#168751, Hazael Maldonado Torres)
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
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.
|
||||
|
||||
* glib/goption.c (parse_int): Fix an error message.
|
||||
(#168751, Hazael Maldonado Torres)
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
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.
|
||||
|
||||
* glib/goption.c (parse_int): Fix an error message.
|
||||
(#168751, Hazael Maldonado Torres)
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -99,9 +99,9 @@ gint g_file_open_tmp (const gchar *tmpl,
|
||||
|
||||
gchar *g_build_path (const gchar *separator,
|
||||
const gchar *first_element,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
gchar *g_build_filename (const gchar *first_element,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -57,6 +57,12 @@
|
||||
#define G_GNUC_MALLOC
|
||||
#endif
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
|
||||
#else
|
||||
#define G_GNUC_NULL_TERMINATED
|
||||
#endif
|
||||
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
|
||||
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
|
||||
__attribute__((__format__ (__printf__, format_idx, arg_idx)))
|
||||
|
@ -189,9 +189,10 @@ gchar* g_strndup (const gchar *str,
|
||||
gchar* g_strnfill (gsize length,
|
||||
gchar fill_char) G_GNUC_MALLOC;
|
||||
gchar* g_strconcat (const gchar *string1,
|
||||
...) G_GNUC_MALLOC; /* NULL terminated */
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
gchar* g_strjoin (const gchar *separator,
|
||||
...) G_GNUC_MALLOC; /* NULL terminated */
|
||||
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
|
||||
|
||||
/* Make a copy of a string interpreting C string -style escape
|
||||
* sequences. Inverse of g_strescape. The recognized sequences are \b
|
||||
* \f \n \r \t \\ \" and the octal format.
|
||||
|
@ -1,5 +1,8 @@
|
||||
2005-03-08 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gobject.h: Use G_GNUC_NULL_TERMINATED where
|
||||
appropriate. (#164706, Marc Meissner)
|
||||
|
||||
* gvaluearray.h: Small cleanup (use G_BEGIN/END_DECLS).
|
||||
(#168474, Fabricio Barros Cabral)
|
||||
|
||||
|
@ -131,7 +131,7 @@ GParamSpec**g_object_interface_list_properties (gpointer g_iface,
|
||||
|
||||
gpointer g_object_new (GType object_type,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
gpointer g_object_newv (GType object_type,
|
||||
guint n_parameters,
|
||||
GParameter *parameters);
|
||||
@ -140,16 +140,16 @@ GObject* g_object_new_valist (GType object_type,
|
||||
va_list var_args);
|
||||
void g_object_set (gpointer object,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_get (gpointer object,
|
||||
const gchar *first_property_name,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
gpointer g_object_connect (gpointer object,
|
||||
const gchar *signal_spec,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_disconnect (gpointer object,
|
||||
const gchar *signal_spec,
|
||||
...);
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
void g_object_set_valist (GObject *object,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args);
|
||||
|
Loading…
Reference in New Issue
Block a user