From: Richard W.M. Jones Date: Thu, 2 Dec 2010 13:31:52 +0000 (+0000) Subject: fish: Fix generation of code to handle Int/Int64 optional arguments. X-Git-Tag: 1.7.19~7 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=01d62985c3f0234fc0e9e4909c85c6a401c4bfcc;p=libguestfs.git fish: Fix generation of code to handle Int/Int64 optional arguments. --- diff --git a/generator/generator_fish.ml b/generator/generator_fish.ml index 516c5b1..61916a3 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