diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-12-02 13:31:52 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-12-02 13:31:52 +0000 |
commit | 01d62985c3f0234fc0e9e4909c85c6a401c4bfcc (patch) | |
tree | 3f8ae39ae9089c8db206e32f0c5e92ef1233dd85 | |
parent | faf1cd50492fd014267c22a0e988a75f1c337364 (diff) | |
download | libguestfs-01d62985c3f0234fc0e9e4909c85c6a401c4bfcc.tar.gz libguestfs-01d62985c3f0234fc0e9e4909c85c6a401c4bfcc.tar.xz libguestfs-01d62985c3f0234fc0e9e4909c85c6a401c4bfcc.zip |
fish: Fix generation of code to handle Int/Int64 optional arguments.
-rw-r--r-- | generator/generator_fish.ml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml index 516c5b19..61916a35 100644 --- a/generator/generator_fish.ml +++ b/generator/generator_fish.ml @@ -459,10 +459,12 @@ Guestfish will prompt for these separately." "The Int type in the generator is a signed 31 bit int." in Some (min, max, comment) in let expr = sprintf "&argv[i][%d]" (len+1) in - parse_integer expr "xstrtoll" "long long" "int" range name + parse_integer expr "xstrtoll" "long long" "int" range + (sprintf "optargs_s.%s" n) | Int64 n -> let expr = sprintf "&argv[i][%d]" (len+1) in - parse_integer expr "xstrtoll" "long long" "int64_t" None name + parse_integer expr "xstrtoll" "long long" "int64_t" None + (sprintf "optargs_s.%s" n) | String n -> pr " optargs_s.%s = &argv[i][%d];\n" n (len+1); | _ -> assert false |