diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 11:18:19 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-06-29 11:18:19 +0100 |
commit | 5af058b7d02607dcbcfb8f561cc0b8fec9a7d305 (patch) | |
tree | 536b550a5d1baa8be37343a73ef5577d861daf26 | |
parent | f450ce75b754fb869b34433c0126f7bb592b141b (diff) | |
download | libguestfs-5af058b7d02607dcbcfb8f561cc0b8fec9a7d305.tar.gz libguestfs-5af058b7d02607dcbcfb8f561cc0b8fec9a7d305.tar.xz libguestfs-5af058b7d02607dcbcfb8f561cc0b8fec9a7d305.zip |
Prevent 'n' being used as a parameter name.
Parameters named 'n' sometimes break the Perl bindings, so
check for this in the generator and prevent it.
-rwxr-xr-x | src/generator.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/generator.ml b/src/generator.ml index ccd68cff..aecb152b 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2173,7 +2173,7 @@ or data on the filesystem."); This resizes (expands or shrinks) an existing LVM physical volume to match the new size of the underlying device."); - ("sfdisk_N", (RErr, [String "device"; Int "n"; + ("sfdisk_N", (RErr, [String "device"; Int "partnum"; Int "cyls"; Int "heads"; Int "sectors"; String "line"]), 99, [DangerWillRobinson], [], @@ -2780,8 +2780,8 @@ let check_functions () = failwithf "%s has a param/ret called 'value', which causes conflicts in the OCaml bindings, use something like 'val' or a more descriptive name" name; if n = "int" || n = "char" || n = "short" || n = "long" then failwithf "%s has a param/ret which conflicts with a C type (eg. 'int', 'char' etc.)" name; - if n = "i" then - failwithf "%s has a param/ret called 'i', which will cause some conflicts in the generated code" name; + if n = "i" || n = "n" then + failwithf "%s has a param/ret called 'i' or 'n', which will cause some conflicts in the generated code" name; if n = "argv" || n = "args" then failwithf "%s has a param/ret called 'argv' or 'args', which will cause some conflicts in the generated code" name in |