summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2016-06-09 08:38:30 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2016-06-09 08:38:30 +0200
commit1c965b621f2a5ad0769e14b4ba95d22fd555e6ab (patch)
tree2f4577024fd90e889316c942f9f5eb436a891009
parentb5cec759e21a4962fb6a82b36282d970ce42d752 (diff)
downloadlibgee-1c965b621f2a5ad0769e14b4ba95d22fd555e6ab.tar.gz
Handle deprecated Deprecated annotation with newer valac
-rw-r--r--gee/hashmultiset.vala4
-rw-r--r--gee/map.vala16
2 files changed, 20 insertions, 0 deletions
diff --git a/gee/hashmultiset.vala b/gee/hashmultiset.vala
index 5b25acd..1bedb75 100644
--- a/gee/hashmultiset.vala
+++ b/gee/hashmultiset.vala
@@ -59,7 +59,11 @@ public class Gee.HashMultiSet<G> : AbstractMultiSet<G> {
* @param hash_func an optional element hash function
* @param equal_func an optional element equality testing function
*/
+#if VALA_0_32
+ [Version (deprecated = true, deprecated_since = "0.13.3", replacement = "gee_hash_multi_set_new_fixed")]
+#else
[Deprecated (since = "0.13.3", replacement = "gee_hash_multi_set_new_fixed")]
+#endif
[CCode (cname = "gee_hash_multi_set_new")]
public HashMultiSet.broken (HashDataFunc<G>? hash_func = null, EqualDataFunc<G>? equal_func = null) {
base (new HashMap<G, int> (hash_func, equal_func));
diff --git a/gee/map.vala b/gee/map.vala
index e8e3138..ae2cdb5 100644
--- a/gee/map.vala
+++ b/gee/map.vala
@@ -92,7 +92,11 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
*
* @return ``true`` if key is found, ``false`` otherwise
*/
+#if VALA_0_32
+ [Version (deprecated = true, replacement = "Map.has_key")]
+#else
[Deprecated (replacement = "Map.has_key")]
+#endif
public bool contains (K key) {
return has_key(key);
}
@@ -143,7 +147,11 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
*
* @return ``true`` if the map has been changed, ``false`` otherwise
*/
+#if VALA_0_32
+ [Version (deprecated = true, replacement = "Map.unset")]
+#else
[Deprecated (replacement = "Map.unset")]
+#endif
public bool remove (K key, out V? value = null) {
return unset (key, out value);
}
@@ -192,7 +200,11 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
*
* @param map the map which common items are deleted from this map
*/
+#if VALA_0_32
+ [Version (deprecated = true, replacement = "Map.unset_all")]
+#else
[Deprecated (replacement = "Map.unset_all")]
+#endif
public bool remove_all (Map<K,V> map) {
return unset_all (map);
}
@@ -216,7 +228,11 @@ public interface Gee.Map<K,V> : Object, Iterable<Map.Entry<K,V>> {
*
* @param map the map which items will be compared with this map
*/
+#if VALA_0_32
+ [Version (deprecated = true, replacement = "Map.has_all")]
+#else
[Deprecated (replacement = "Map.has_all")]
+#endif
public bool contains_all (Map<K,V> map) {
return has_all (map);
}