From 8442ff31df29bf288ac7ae2526fdadfbc9eeca43 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Thu, 24 Jun 2010 14:51:32 +0530 Subject: [PATCH] libgupnp-dlna: Return const pointers from get functions The gupnp_dlna_information_get* functions return pointers to internal structure members (since these are not expected to be modified), so these should be made const pointers. --- libgupnp-dlna/gupnp-dlna-information.c | 6 +++--- libgupnp-dlna/gupnp-dlna-information.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libgupnp-dlna/gupnp-dlna-information.c b/libgupnp-dlna/gupnp-dlna-information.c index c0933aa..d6e8a1b 100644 --- a/libgupnp-dlna/gupnp-dlna-information.c +++ b/libgupnp-dlna/gupnp-dlna-information.c @@ -183,21 +183,21 @@ gupnp_dlna_information_new (gchar *name, NULL); } -gchar * +const gchar * gupnp_dlna_information_get_name (GUPnPDLNAInformation *self) { GUPnPDLNAInformationPrivate *priv = GET_PRIVATE (self); return priv->name; } -gchar * +const gchar * gupnp_dlna_information_get_mime (GUPnPDLNAInformation *self) { GUPnPDLNAInformationPrivate *priv = GET_PRIVATE (self); return priv->mime; } -GstDiscovererInformation * +const GstDiscovererInformation * gupnp_dlna_information_get_info (GUPnPDLNAInformation *self) { GUPnPDLNAInformationPrivate *priv = GET_PRIVATE (self); diff --git a/libgupnp-dlna/gupnp-dlna-information.h b/libgupnp-dlna/gupnp-dlna-information.h index 4b626d1..3e99a8e 100644 --- a/libgupnp-dlna/gupnp-dlna-information.h +++ b/libgupnp-dlna/gupnp-dlna-information.h @@ -59,9 +59,9 @@ gupnp_dlna_information_new (gchar *name, gchar *mime, GstDiscovererInformation *info); -gchar * gupnp_dlna_information_get_name (GUPnPDLNAInformation *self); -gchar * gupnp_dlna_information_get_mime (GUPnPDLNAInformation *self); -GstDiscovererInformation * +const gchar * gupnp_dlna_information_get_name (GUPnPDLNAInformation *self); +const gchar * gupnp_dlna_information_get_mime (GUPnPDLNAInformation *self); +const GstDiscovererInformation * gupnp_dlna_information_get_info (GUPnPDLNAInformation *self); G_GNUC_INTERNAL GUPnPDLNAInformation * -- 2.1.4