[gedit-code-assistance] Pass mapping func owned



commit 9e5379d65085034d594fc603531c7dd0f1adf7f2
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Sat Mar 3 15:59:19 2012 +0100

    Pass mapping func owned

 src/gcp-c-semantic-value.vala |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/gcp-c-semantic-value.vala b/src/gcp-c-semantic-value.vala
index 8ce8895..abc010f 100644
--- a/src/gcp-c-semantic-value.vala
+++ b/src/gcp-c-semantic-value.vala
@@ -9,14 +9,14 @@ class SemanticValue : Gcp.SemanticValue
 
 	private class Translator
 	{
-		private unowned CursorMappedFunc d_mapped;
+		private CursorMappedFunc d_mapped;
 		private SemanticValue? d_parent;
 		private SemanticValue? d_current;
 		private File? d_source;
 
-		public Translator(CursorMappedFunc mapped, File? source)
+		public Translator(owned CursorMappedFunc mapped, File? source)
 		{
-			d_mapped = mapped;
+			d_mapped = (owned)mapped;
 			d_source = source;
 		}
 
@@ -189,9 +189,9 @@ class SemanticValue : Gcp.SemanticValue
 
 	public static SemanticValue? translate(CX.Cursor cursor,
 	                                       File? source,
-	                                       CursorMappedFunc mapped)
+	                                       owned CursorMappedFunc mapped)
 	{
-		Translator tr = new Translator(mapped, source);
+		Translator tr = new Translator((owned)mapped, source);
 		SemanticValue ret = new SemanticValue(cursor);
 
 		tr.translate(ret);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]