[folks] Mark two strings as unowned to prevent unnecessary string copies
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Mark two strings as unowned to prevent unnecessary string copies
- Date: Mon, 30 Aug 2010 20:11:43 +0000 (UTC)
commit 0108786c0faffbc95e4eee5875cee8f0675b5a44
Author: Philip Withnall <philip withnall collabora co uk>
Date: Mon Aug 30 11:22:13 2010 +0100
Mark two strings as unowned to prevent unnecessary string copies
folks/individual-aggregator.vala | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 968ffc9..0b6b0cf 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -252,12 +252,12 @@ public class Folks.IndividualAggregator : Object
{
/* If we trust the PersonaStore the Persona came from, we can
* attempt to link based on its linkable properties. */
- foreach (string foo in persona.linkable_properties)
+ foreach (unowned string foo in persona.linkable_properties)
{
/* FIXME: If we just use string prop_name directly in the
* foreach, Vala doesn't copy it into the closure data, and
* prop_name ends up as NULL. bgo#628336 */
- string prop_name = foo;
+ unowned string prop_name = foo;
unowned ObjectClass pclass = persona.get_class ();
if (pclass.find_property (prop_name) == null)
@@ -341,7 +341,7 @@ public class Folks.IndividualAggregator : Object
/* Insert maps from the Persona's linkable properties to the
* Individual. */
- foreach (string prop_name in
+ foreach (unowned string prop_name in
final_persona.linkable_properties)
{
unowned ObjectClass pclass = final_persona.get_class ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]