Deprecate g_cache_value_foreach. (#322956, Nicolas Caniart)
authorMatthias Clasen <mclasen@redhat.com>
Sat, 3 Dec 2005 06:53:31 +0000 (06:53 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 3 Dec 2005 06:53:31 +0000 (06:53 +0000)
2005-12-03  Matthias Clasen  <mclasen@redhat.com>

* glib/glib.symbols:
* glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
Nicolas Caniart)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
docs/reference/ChangeLog
docs/reference/glib/tmpl/caches.sgml
glib/gcache.h
glib/glib.symbols

index 8cc4eef278a520794588c891f65a0e2cd2c76783..ca48481a606e078cb8e9bfd290a4602294bc257e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-12-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/glib.symbols: 
+       * glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
+       Nicolas Caniart)
+
        * glib/gmappedfile.c: Make mapping of empty files
        work.  (#321530)
        
index 8cc4eef278a520794588c891f65a0e2cd2c76783..ca48481a606e078cb8e9bfd290a4602294bc257e 100644 (file)
@@ -1,5 +1,9 @@
 2005-12-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/glib.symbols: 
+       * glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
+       Nicolas Caniart)
+
        * glib/gmappedfile.c: Make mapping of empty files
        work.  (#321530)
        
index 8cc4eef278a520794588c891f65a0e2cd2c76783..ca48481a606e078cb8e9bfd290a4602294bc257e 100644 (file)
@@ -1,5 +1,9 @@
 2005-12-03  Matthias Clasen  <mclasen@redhat.com>
 
+       * glib/glib.symbols: 
+       * glib/gcache.h: Deprecate g_cache_value_foreach. (#322956,
+       Nicolas Caniart)
+
        * glib/gmappedfile.c: Make mapping of empty files
        work.  (#321530)
        
index 874188e29e40a0ee895b7805c3cc9a4ca275318f..a25b5eee58a789b96468427cca1caa2370ab2950 100644 (file)
@@ -1,5 +1,8 @@
 2005-12-03  Matthias Clasen  <mclasen@redhat.com>
-       
+
+       * glib/tmpl/caches.sgml: Document g_cache_value_foreach
+       as deprecated; document g_cache_key_foreach more thorougly
+
        * glib/glib-sections.txt:
        * glib/tmpl/linked_lists_single.sgml: Add g_slist_free1.
 
index bdda2116d5490c38b952d33d4edd3b66b5225238..65633caec75125b662678dd782c6582229ba67ae 100644 (file)
@@ -104,6 +104,11 @@ Note that it does not destroy the keys and values which were contained in the
 <para>
 Calls the given function for each of the keys in the #GCache.
 </para>
+<note><para>@func is passed three parameters, the value and key of a
+cache entry and the @user_data. The order of value and key is different
+from the order in which g_hash_table_foreach() passes key-value pairs
+to its callback function !
+</para></note>
 
 @cache: a #GCache.
 @func: the function to call with each #GCache key.
@@ -118,6 +123,8 @@ Calls the given function for each of the values in the #GCache.
 @cache: a #GCache.
 @func: the function to call with each #GCache value.
 @user_data: user data to pass to the function.
+@Deprecated: Since it passes pointers to internal data structures
+to @func; use g_cache_key_foreach() instead
 
 
 <!-- ##### USER_FUNCTION GCacheDestroyFunc ##### -->
index a9128b653a0defa0030452bc329c538cf7191558..93341b87fc94356a727f85c952211d8ec2d6b362 100644 (file)
@@ -54,9 +54,11 @@ void     g_cache_remove        (GCache            *cache,
 void     g_cache_key_foreach   (GCache            *cache,
                                 GHFunc             func,
                                 gpointer           user_data);
+#ifndef G_DISABLE_DEPRECATED
 void     g_cache_value_foreach (GCache            *cache,
                                 GHFunc             func,
                                 gpointer           user_data);
+#endif
 
 G_END_DECLS
 
index cde48830ba36ae542614257a0394294731a6d0c5..aec5e494c2a576da438cb21d6f76dd0684cb8df3 100644 (file)
@@ -104,9 +104,11 @@ g_cache_insert
 g_cache_key_foreach
 g_cache_new
 g_cache_remove
+#ifndef G_DISABLE_DEPRECATED
 g_cache_value_foreach
 #endif
 #endif
+#endif
 
 #if IN_HEADER(__G_COMPLETION_H__)
 #if IN_FILE(__G_COMPLETION_C__)