summaryrefslogtreecommitdiff
path: root/gdata/gcontact
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2010-04-01 22:58:46 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2010-04-01 22:58:46 +0100
commitf98aed130bb2275ab4ea50aaec6016562aa54a3a (patch)
tree0bf983f056b44a3e2c8bad302a363c04303af441 /gdata/gcontact
parentb926e8e717f309a7d49c57560b4ad4dbf683b215 (diff)
downloadlibgdata-f98aed130bb2275ab4ea50aaec6016562aa54a3a.tar.gz
[core] Add G_GNUC_MALLOC to all functions returning allocated data
This is in addition to G_GNUC_WARN_UNUSED_RESULT, so that we get the benefit of compiler aliasing optimisations, plus a reminder to not discard returned values without freeing/unreffing them.
Diffstat (limited to 'gdata/gcontact')
-rw-r--r--gdata/gcontact/gdata-gcontact-calendar.h2
-rw-r--r--gdata/gcontact/gdata-gcontact-event.h3
-rw-r--r--gdata/gcontact/gdata-gcontact-jot.h2
-rw-r--r--gdata/gcontact/gdata-gcontact-relation.h3
-rw-r--r--gdata/gcontact/gdata-gcontact-website.h2
5 files changed, 7 insertions, 5 deletions
diff --git a/gdata/gcontact/gdata-gcontact-calendar.h b/gdata/gcontact/gdata-gcontact-calendar.h
index cfc64271..7eb37775 100644
--- a/gdata/gcontact/gdata-gcontact-calendar.h
+++ b/gdata/gcontact/gdata-gcontact-calendar.h
@@ -99,7 +99,7 @@ typedef struct {
GType gdata_gcontact_calendar_get_type (void) G_GNUC_CONST;
GDataGContactCalendar *gdata_gcontact_calendar_new (const gchar *uri, const gchar *relation_type,
- const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT;
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
gint gdata_gcontact_calendar_compare (const GDataGContactCalendar *a, const GDataGContactCalendar *b);
const gchar *gdata_gcontact_calendar_get_uri (GDataGContactCalendar *self);
diff --git a/gdata/gcontact/gdata-gcontact-event.h b/gdata/gcontact/gdata-gcontact-event.h
index 6a9caf0f..bbe0a997 100644
--- a/gdata/gcontact/gdata-gcontact-event.h
+++ b/gdata/gcontact/gdata-gcontact-event.h
@@ -86,7 +86,8 @@ typedef struct {
GType gdata_gcontact_event_get_type (void) G_GNUC_CONST;
-GDataGContactEvent *gdata_gcontact_event_new (const GDate *date, const gchar *relation_type, const gchar *label) G_GNUC_WARN_UNUSED_RESULT;
+GDataGContactEvent *gdata_gcontact_event_new (const GDate *date, const gchar *relation_type,
+ const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
void gdata_gcontact_event_get_date (GDataGContactEvent *self, GDate *date);
void gdata_gcontact_event_set_date (GDataGContactEvent *self, const GDate *date);
diff --git a/gdata/gcontact/gdata-gcontact-jot.h b/gdata/gcontact/gdata-gcontact-jot.h
index b4e42170..2eb89889 100644
--- a/gdata/gcontact/gdata-gcontact-jot.h
+++ b/gdata/gcontact/gdata-gcontact-jot.h
@@ -122,7 +122,7 @@ typedef struct {
GType gdata_gcontact_jot_get_type (void) G_GNUC_CONST;
-GDataGContactJot *gdata_gcontact_jot_new (const gchar *content, const gchar *relation_type) G_GNUC_WARN_UNUSED_RESULT;
+GDataGContactJot *gdata_gcontact_jot_new (const gchar *content, const gchar *relation_type) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
const gchar *gdata_gcontact_jot_get_content (GDataGContactJot *self);
void gdata_gcontact_jot_set_content (GDataGContactJot *self, const gchar *content);
diff --git a/gdata/gcontact/gdata-gcontact-relation.h b/gdata/gcontact/gdata-gcontact-relation.h
index efcd004e..73660f88 100644
--- a/gdata/gcontact/gdata-gcontact-relation.h
+++ b/gdata/gcontact/gdata-gcontact-relation.h
@@ -230,7 +230,8 @@ typedef struct {
GType gdata_gcontact_relation_get_type (void) G_GNUC_CONST;
-GDataGContactRelation *gdata_gcontact_relation_new (const gchar *name, const gchar *relation_type, const gchar *label) G_GNUC_WARN_UNUSED_RESULT;
+GDataGContactRelation *gdata_gcontact_relation_new (const gchar *name, const gchar *relation_type,
+ const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
const gchar *gdata_gcontact_relation_get_name (GDataGContactRelation *self);
void gdata_gcontact_relation_set_name (GDataGContactRelation *self, const gchar *name);
diff --git a/gdata/gcontact/gdata-gcontact-website.h b/gdata/gcontact/gdata-gcontact-website.h
index da0d62fd..91bd5857 100644
--- a/gdata/gcontact/gdata-gcontact-website.h
+++ b/gdata/gcontact/gdata-gcontact-website.h
@@ -147,7 +147,7 @@ typedef struct {
GType gdata_gcontact_website_get_type (void) G_GNUC_CONST;
GDataGContactWebsite *gdata_gcontact_website_new (const gchar *uri, const gchar *relation_type,
- const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT;
+ const gchar *label, gboolean is_primary) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
gint gdata_gcontact_website_compare (const GDataGContactWebsite *a, const GDataGContactWebsite *b);
const gchar *gdata_gcontact_website_get_uri (GDataGContactWebsite *self);