chiark / gitweb /
update wip; see cvs diff from 1.12 before checkin
authorian <ian>
Sun, 5 Feb 2006 01:04:27 +0000 (01:04 +0000)
committerian <ian>
Sun, 5 Feb 2006 01:04:27 +0000 (01:04 +0000)
cdb/writeable.c

index ccdd6aa3de4e15b4a974544060d3ab2706ae59bf..3613a7b8084642d31c807fde215590f20caf00b1 100644 (file)
@@ -92,6 +92,17 @@ static void ht_maybeupdate(HashTable *ht, const char *key,
   Tcl_SetHashValue(he, val_eat);
 }
 
+static fixme ht_lookup(HashTable *ht, const char *key) {
+  Tcl_HashEntry *he;
+  const HashValue *htv;
+  
+  he= Tcl_FindHashEntry(ht, key);
+  if (!he) return notfound;
+  
+  htv= Tcl_GetHashValue(he);
+  
+}
+
 static int ht_forall(HashTable *ht,
                     int (*fn)(const char *key, HashValue *val,
                               struct ht_forall_ctx *ctx),
@@ -834,3 +845,15 @@ int cht_do_cdbwr_delete(ClientData cd, Tcl_Interp *ip, void *rw_v,
                        const char *key) {
   return update(ip, rw_v, key, 0, 0);
 }
+
+/*---------- Lookups ----------*/
+
+static int lookup(Tcl_Interp *ip, Rw *rw, const char *key, ) {
+  ht_lookup(
+
+int cht_do_cdbwr_lookup(ClientData cd, Tcl_Interp *ip, void *db,
+                       const char *key, Tcl_Obj *def, Tcl_Obj **result) {
+  
+}
+
+int cht_do_cdbwr_lookup_hb(ClientData cd, Tcl_Interp *ip, void *db, const char *key, HBytes_Value def, HBytes_Value *result);