generator: ocaml: Don't link to undocumented methods.

As for the previous commit, don't link to a method if it's not
exported by the OCaml bindings.
This commit is contained in:
Richard W.M. Jones
2017-03-03 08:44:15 +00:00
parent 41040182ae
commit 7527312784

View File

@@ -189,7 +189,11 @@ end
| Not_deprecated -> ()
| Replaced_by replacement ->
has_tags := true;
pr "\n\n @deprecated Use {!%s} instead" replacement
let f_replacement = Actions.find replacement in
if is_documented f_replacement then
pr "\n\n @deprecated Use {!%s} instead" replacement
else
pr "\n\n @deprecated This is replaced by method %s which is not exported by the OCaml bindings" replacement
| Deprecated_no_replacement ->
has_tags := true;
pr "\n\n @deprecated There is no documented replacement"