Mark functions with G_GNUC_MALLOC when appropriate.

2004-11-28  Matthias Clasen  <mclasen@redhat.com>

	* glib/gconvert.h:
	* glib/gkeyfile.h:
	* glib/gmem.h:
	* glib/gstrfuncs.h:
	* glib/gunicode.h:
	* glib/gutils.h: Mark functions with G_GNUC_MALLOC when appropriate.

	* glib/glib.symbols: Add G_GNUC_MALLOC annotations.

	* glib/gmacros.h (G_GNUC_MALLOC): Add a macro for
	__attribute__((__malloc__)).  (#61780)
This commit is contained in:
Matthias Clasen
2004-11-28 19:12:04 +00:00
committed by Matthias Clasen
parent 75a1d303ef
commit 379e87466d
13 changed files with 187 additions and 114 deletions

View File

@@ -45,12 +45,12 @@ typedef struct _GMemVTable GMemVTable;
/* Memory allocation functions
*/
gpointer g_malloc (gulong n_bytes);
gpointer g_malloc0 (gulong n_bytes);
gpointer g_malloc (gulong n_bytes) G_GNUC_MALLOC;
gpointer g_malloc0 (gulong n_bytes) G_GNUC_MALLOC;
gpointer g_realloc (gpointer mem,
gulong n_bytes);
void g_free (gpointer mem);
gpointer g_try_malloc (gulong n_bytes);
gpointer g_try_malloc (gulong n_bytes) G_GNUC_MALLOC;
gpointer g_try_realloc (gpointer mem,
gulong n_bytes);