generator: Fix generation of library-side stubs with optional String arguments.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 26 Jan 2011 14:15:23 +0000 (14:15 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 26 Jan 2011 14:15:23 +0000 (14:15 +0000)
generator/generator_c.ml

index 0b3c850..46ba691 100644 (file)
@@ -1047,7 +1047,7 @@ check_state (guestfs_h *g, const char *caller)
                  pr "  else\n";
                  pr "    args.%s = 0;\n" n
              | String n ->
-                 pr "    args.%s = (char *) %s;\n" n n;
+                 pr "    args.%s = (char *) optargs->%s;\n" n n;
                  pr "  else\n";
                  pr "    args.%s = (char *) \"\";\n" n
              | _ -> assert false