[Libguestfs] [PATCH 3/3] ocaml: hide internal methods from apidocs

Pino Toscano ptoscano at redhat.com
Thu Feb 12 14:18:28 UTC 2015


---
 generator/ocaml.ml | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/generator/ocaml.ml b/generator/ocaml.ml
index f8707ae..9284005 100644
--- a/generator/ocaml.ml
+++ b/generator/ocaml.ml
@@ -144,9 +144,14 @@ end
     fun ({ name = name; style = style; deprecated_by = deprecated_by;
           non_c_aliases = non_c_aliases;
           shortdesc = shortdesc } as f) ->
+      let need_doc = is_documented f in
+
+      if not need_doc then
+        pr "(**/**)\n";
+
       generate_ocaml_prototype name style;
 
-      if is_documented f then (
+      if need_doc then (
         pr "(** %s" shortdesc;
         (match deprecated_by with
          | None -> ()
@@ -155,14 +160,18 @@ end
         );
         pr " *)\n";
       );
-      pr "\n";
 
       (* Aliases. *)
       List.iter (
         fun alias ->
-          generate_ocaml_prototype alias style;
           pr "\n";
+          generate_ocaml_prototype alias style;
       ) non_c_aliases;
+
+      if not need_doc then
+        pr "(**/**)\n";
+
+      pr "\n";
   ) external_functions_sorted;
 
   pr "\
-- 
1.9.3




More information about the Libguestfs mailing list