[libgee] Update code using deprecated # modifier or operator



commit 780e79f624419b1911de422cbd72f289d23cd9af
Author: Jürg Billeter <j bitron ch>
Date:   Thu Apr 30 14:41:22 2009 +0200

    Update code using deprecated # modifier or operator
---
 gee/hashmap.vala |   24 ++++++++++++------------
 gee/hashset.vala |   22 +++++++++++-----------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index 3802468..1c62131 100644
--- a/gee/hashmap.vala
+++ b/gee/hashmap.vala
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
  * Copyright (C) 1997-2000  GLib Team and others
- * Copyright (C) 2007-2008  Jürg Billeter
+ * Copyright (C) 2007-2009  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -129,12 +129,12 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
 
 	public void clear () {
 		for (int i = 0; i < _array_size; i++) {
-			Node<K,V> node = #_nodes[i];
+			Node<K,V> node = (owned) _nodes[i];
 			while (node != null) {
-				Node next = #node.next;
+				Node next = (owned) node.next;
 				node.key = null;
 				node.value = null;
-				node = #next;
+				node = (owned) next;
 			}
 		}
 		_nnodes = 0;
@@ -152,14 +152,14 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
 			for (int i = 0; i < _array_size; i++) {
 				Node<K,V> node;
 				Node<K,V> next;
-				for (node = #_nodes[i]; node != null; node = #next) {
-					next = #node.next;
+				for (node = (owned) _nodes[i]; node != null; node = (owned) next) {
+					next = (owned) node.next;
 					uint hash_val = node.key_hash % new_array_size;
-					node.next = #new_nodes[hash_val];
-					new_nodes[hash_val] = #node;
+					node.next = (owned) new_nodes[hash_val];
+					new_nodes[hash_val] = (owned) node;
 				}
 			}
-			_nodes = #new_nodes;
+			_nodes = (owned) new_nodes;
 			_array_size = new_array_size;
 		}
 	}
@@ -175,9 +175,9 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
 		public Node<K,V> next;
 		public uint key_hash;
 
-		public Node (K# k, V# v, uint hash) {
-			key = #k;
-			value = #v;
+		public Node (owned K k, owned V v, uint hash) {
+			key = (owned) k;
+			value = (owned) v;
 			key_hash = hash;
 		}
 	}
diff --git a/gee/hashset.vala b/gee/hashset.vala
index d614701..af23436 100644
--- a/gee/hashset.vala
+++ b/gee/hashset.vala
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
  * Copyright (C) 1997-2000  GLib Team and others
- * Copyright (C) 2007-2008  Jürg Billeter
+ * Copyright (C) 2007-2009  Jürg Billeter
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -114,11 +114,11 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
 
 	public void clear () {
 		for (int i = 0; i < _array_size; i++) {
-			Node<G> node = #_nodes[i];
+			Node<G> node = (owned) _nodes[i];
 			while (node != null) {
-				Node next = #node.next;
+				Node next = (owned) node.next;
 				node.key = null;
-				node = #next;
+				node = (owned) next;
 			}
 		}
 		_nnodes = 0;
@@ -136,14 +136,14 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
 			for (int i = 0; i < _array_size; i++) {
 				Node<G> node;
 				Node<G> next;
-				for (node = #_nodes[i]; node != null; node = #next) {
-					next = #node.next;
+				for (node = (owned) _nodes[i]; node != null; node = (owned) next) {
+					next = (owned) node.next;
 					uint hash_val = node.key_hash % new_array_size;
-					node.next = #new_nodes[hash_val];
-					new_nodes[hash_val] = #node;
+					node.next = (owned) new_nodes[hash_val];
+					new_nodes[hash_val] = (owned) node;
 				}
 			}
-			_nodes = #new_nodes;
+			_nodes = (owned) new_nodes;
 			_array_size = new_array_size;
 		}
 	}
@@ -158,8 +158,8 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
 		public Node<G> next;
 		public uint key_hash;
 
-		public Node (G# k, uint hash) {
-			key = #k;
+		public Node (owned G k, uint hash) {
+			key = (owned) k;
 			key_hash = hash;
 		}
 	}



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