[Libguestfs] [PATCH 3/3] ocaml: hide internal methods from apidocs
Richard W.M. Jones
rjones at redhat.com
Thu Feb 12 14:41:14 UTC 2015
On Thu, Feb 12, 2015 at 03:18:28PM +0100, Pino Toscano wrote:
> ---
> 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
>
> _______________________________________________
> Libguestfs mailing list
> Libguestfs at redhat.com
> https://www.redhat.com/mailman/listinfo/libguestfs
ACK series.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
More information about the Libguestfs
mailing list