+ ) args;
+
+ if optargs <> [] then (
+ pr " struct guestfs_%s_argv optargs_s = { .bitmask = 0 };\n" shortname;
+ pr " struct guestfs_%s_argv *optargs = &optargs_s;\n" shortname;
+
+ (* XXX Ugh PHP doesn't have proper optional arguments, so we
+ * have to use sentinel values.
+ *)
+ (* Since we don't know if PHP types will exactly match structure
+ * types, declare some local variables here.
+ *)
+ List.iter (
+ function
+ | Bool n -> pr " zend_bool optargs_t_%s = -1;\n" n
+ | Int n | Int64 n -> pr " long optargs_t_%s = -1;\n" n
+ | String n ->
+ pr " char *optargs_t_%s = NULL;\n" n;
+ pr " int optargs_t_%s_size = -1;\n" n
+ | _ -> assert false
+ ) optargs
+ );