[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/objectcache objectcache.c
From: |
Reinhard Mueller |
Subject: |
gnue/geas/src/objectcache objectcache.c |
Date: |
Mon, 28 May 2001 07:57:51 -0700 |
CVSROOT: /cvs
Module name: gnue
Changes by: Reinhard Mueller <address@hidden> 01/05/28 07:57:51
Modified files:
geas/src/objectcache: objectcache.c
Log message:
(oc_flush_object_to_store): pass a hash with only name-value pairs to
write_to_objectstore instead of a hash with name-_FieldData pairs
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/geas/src/objectcache/objectcache.c.diff?cvsroot=OldCVS&tr1=1.45&tr2=1.46&r1=text&r2=text
Patches:
Index: gnue/geas/src/objectcache/objectcache.c
diff -u gnue/geas/src/objectcache/objectcache.c:1.45
gnue/geas/src/objectcache/objectcache.c:1.46
--- gnue/geas/src/objectcache/objectcache.c:1.45 Fri May 25 16:46:21 2001
+++ gnue/geas/src/objectcache/objectcache.c Mon May 28 07:57:51 2001
@@ -371,14 +371,29 @@
}
void
+_fill_values (gchar *key, _FieldData *field, GHashTable *values)
+{
+ g_hash_table_insert (values, key, field->value);
+}
+
+void
oc_flush_object_to_store(ObjectData * obj)
{
struct query_result *r = NULL;
+ GHashTable *values;
trace_functioncall();
/* TODO: error checking, updating object flags */
- r = write_to_objectstore (obj->classname, obj->key, obj->fields,
+
+ /* create hash with pure name-values pairs */
+ values = g_hash_table_new (g_str_hash, g_str_equal);
+ g_hash_table_foreach (obj->fields, _fill_values, values);
+
+ r = write_to_objectstore (obj->classname, obj->key, values,
obj->indatabase, NULL, NULL);
+
+ g_hash_table_destroy (values);
+
if( r == NULL || r->success != TRUE )
{
free_query_result(r);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/geas/src/objectcache objectcache.c,
Reinhard Mueller <=