From 01d62985c3f0234fc0e9e4909c85c6a401c4bfcc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Dec 2010 13:31:52 +0000 Subject: [PATCH] fish: Fix generation of code to handle Int/Int64 optional arguments. --- generator/generator_fish.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 -- 1.8.3.1