From 8da095f76b804a8b2fc85c4508a8bc1ab73556e5 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 5 Mar 2013 12:06:43 +0100 Subject: [PATCH] fix in Graph.pp --- graph.ml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/graph.ml b/graph.ml index c721fbee..da70f08a 100644 --- a/graph.ml +++ b/graph.ml @@ -318,14 +318,13 @@ let pp ~name ?vertices | None -> mk_v_table graph in (* map from vertices to integers *) let get_id = - let count_map = mk_v_table graph - and count = ref 0 in + let count = ref 0 in fun vertex -> - try PHashtbl.find count_map vertex + try PHashtbl.find vertices vertex with Not_found -> let n = !count in incr count; - PHashtbl.replace count_map vertex n; + PHashtbl.replace vertices vertex n; n (* print an attribute *) and print_attribute formatter attr =