summaryrefslogtreecommitdiff
path: root/gee
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-04-15 21:05:45 +0200
committerJürg Billeter <j@bitron.ch>2009-04-15 21:08:50 +0200
commit424fbde066f66904aefa46167262e425d57feb83 (patch)
tree371a991d42fd3bc724f455da23512ebae2614ec3 /gee
parentb08ab373e57021de2623b827afbf42ad5498aaa3 (diff)
downloadvala-424fbde066f66904aefa46167262e425d57feb83.tar.gz
Update code using deprecated # modifier or operator
Diffstat (limited to 'gee')
-rw-r--r--gee/hashmap.vala24
-rw-r--r--gee/hashset.vala22
2 files changed, 23 insertions, 23 deletions
diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index 7c4765263..740c40968 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
@@ -126,12 +126,12 @@ public class Gee.HashMap<K,V> : CollectionObject, 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;
@@ -149,14 +149,14 @@ public class Gee.HashMap<K,V> : CollectionObject, 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;
}
}
@@ -172,9 +172,9 @@ public class Gee.HashMap<K,V> : CollectionObject, 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 af9c781fe..f042e7622 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
@@ -111,11 +111,11 @@ public class Gee.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<
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;
@@ -133,14 +133,14 @@ public class Gee.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<
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;
}
}
@@ -155,8 +155,8 @@ public class Gee.HashSet<G> : CollectionObject, Iterable<G>, Collection<G>, Set<
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;
}
}