HCoop
/
bpt
/
coccinelle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release coccinelle-0.2.1-rc1
[bpt/coccinelle.git]
/
commons
/
ocollection
/
oassoch.ml
diff --git
a/commons/ocollection/oassoch.ml
b/commons/ocollection/oassoch.ml
index
94d5d7a
..
60dc6b3
100644
(file)
--- a/
commons/ocollection/oassoch.ml
+++ b/
commons/ocollection/oassoch.ml
@@
-3,7
+3,7
@@
open Common
open Oassoc
(* !!take care!!: this class does side effect, not a pure oassoc *)
open Oassoc
(* !!take care!!: this class does side effect, not a pure oassoc *)
-class ['a,'b] oassoch xs =
+class ['a,'b] oassoch xs =
let h = Common.hash_of_list xs in
object(o)
inherit ['a,'b] oassoc
let h = Common.hash_of_list xs in
object(o)
inherit ['a,'b] oassoc
@@
-24,15
+24,15
@@
class ['a,'b] oassoch xs =
method mem e = raise Todo
method null = (try (Hashtbl.iter (fun k v -> raise ReturnExn) data; false) with ReturnExn -> true)
method mem e = raise Todo
method null = (try (Hashtbl.iter (fun k v -> raise ReturnExn) data; false) with ReturnExn -> true)
- method assoc k =
- try
+ method assoc k =
+ try
Hashtbl.find data k
Hashtbl.find data k
- with Not_found -> (log3 ("pb assoc with k = " ^ (Dumper.dump k)); raise Not_found)
-
+ with Not_found -> (log3 ("pb assoc with k = " ^ (Dumper.dump k)); raise Not_found)
+
method delkey k = (Hashtbl.remove data k; o)
method delkey k = (Hashtbl.remove data k; o)
- method keys =
+ method keys =
List.map fst (o#tolist)
List.map fst (o#tolist)
-end
+end