generator: Small code rearrangement.
authorRichard Jones <rjones@trick.home.annexia.org>
Tue, 18 Aug 2009 08:16:56 +0000 (09:16 +0100)
committerRichard Jones <rjones@trick.home.annexia.org>
Tue, 18 Aug 2009 08:17:52 +0000 (09:17 +0100)
Move code which updates pod2text memo file into a separate function.

src/generator.ml

index 08c28fc..cc97dd5 100755 (executable)
@@ -3822,6 +3822,10 @@ let pod2text_memo : ((int * string * string), string list) Hashtbl.t =
     v
   with
     _ -> Hashtbl.create 13
     v
   with
     _ -> Hashtbl.create 13
+let pod2text_memo_updated () =
+  let chan = open_out pod2text_memo_filename in
+  output_value chan pod2text_memo;
+  close_out chan
 
 (* Useful functions.
  * Note we don't want to use any external OCaml libraries which
 
 (* Useful functions.
  * Note we don't want to use any external OCaml libraries which
@@ -7972,9 +7976,7 @@ and pod2text ~width name longdesc =
          failwithf "pod2text: process signalled or stopped by signal %d" i
     );
     Hashtbl.add pod2text_memo key lines;
          failwithf "pod2text: process signalled or stopped by signal %d" i
     );
     Hashtbl.add pod2text_memo key lines;
-    let chan = open_out pod2text_memo_filename in
-    output_value chan pod2text_memo;
-    close_out chan;
+    pod2text_memo_updated ();
     lines
 
 (* Generate ruby bindings. *)
     lines
 
 (* Generate ruby bindings. *)