[libchamplain] champlain_marker_layer_get_markers() should return a copy of the list
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] champlain_marker_layer_get_markers() should return a copy of the list
- Date: Thu, 10 Feb 2011 21:48:47 +0000 (UTC)
commit 4f40b4d7036c87462eca0b27f3681ce8965d6c0d
Author: JiÅ?Ã Techet <techet gmail com>
Date: Thu Feb 10 22:15:41 2011 +0100
champlain_marker_layer_get_markers() should return a copy of the list
champlain/champlain-marker-layer.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/champlain/champlain-marker-layer.c b/champlain/champlain-marker-layer.c
index 3587693..dd27f50 100644
--- a/champlain/champlain-marker-layer.c
+++ b/champlain/champlain-marker-layer.c
@@ -723,9 +723,10 @@ void champlain_marker_layer_remove_all (ChamplainMarkerLayer *layer)
* champlain_marker_layer_get_markers:
* @layer: a #ChamplainMarkerLayer
*
- * Gets the list of all markers inserted into the layer.
+ * Gets a copy of the list of all markers inserted into the layer. You should
+ * free the list but not its contents.
*
- * Returns: (transfer none) (element-type ChamplainMarker): the list
+ * Returns: (transfer container) (element-type ChamplainMarker): the list
*
* Since: 0.10
*/
@@ -734,7 +735,7 @@ champlain_marker_layer_get_markers (ChamplainMarkerLayer *layer)
{
ChamplainMarkerLayerPrivate *priv = GET_PRIVATE (layer);
- return priv->markers;
+ return g_list_copy (priv->markers);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]