From: Richard W.M. Jones Date: Sat, 6 Aug 2011 14:57:21 +0000 (+0100) Subject: docs: Fix function names in deprecation notices. X-Git-Tag: 1.10.7~1 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=340a13f9915e5a06385a3ec2178e25539cfcd5bc;p=libguestfs.git docs: Fix function names in deprecation notices. (cherry picked from commit 60adf092a8900323c048c94f3f0934be416a3eb6) --- diff --git a/generator/generator_c.ml b/generator/generator_c.ml index 90b060c..62b1189 100644 --- a/generator/generator_c.ml +++ b/generator/generator_c.ml @@ -255,7 +255,7 @@ I.\n\n" pr "This function takes a key or passphrase parameter which could contain sensitive material. Read the section L for more information.\n\n"; - (match deprecation_notice flags with + (match deprecation_notice ~prefix:"guestfs_" flags with | None -> () | Some txt -> pr "%s\n\n" txt ); diff --git a/generator/generator_docstrings.ml b/generator/generator_docstrings.ml index de31aa5..6d242bd 100644 --- a/generator/generator_docstrings.ml +++ b/generator/generator_docstrings.ml @@ -40,17 +40,17 @@ let danger_will_robinson = "B." -let deprecation_notice flags = +let deprecation_notice ?(prefix = "") flags = try let alt = find_map (function DeprecatedBy str -> Some str | _ -> None) flags in let txt = sprintf "This function is deprecated. -In new code, use the C<%s> call instead. +In new code, use the L call instead. Deprecated functions will not be removed from the API, but the fact that they are deprecated indicates that there are problems -with correct use of these functions." alt in +with correct use of these functions." prefix alt in Some txt with Not_found -> None