int mode = (argc > 1) ? atoi(argv[1]) : 0;
/* Initialize the structure with constants */
- AllTypes alltypes = {0};
+ AllTypes alltypes = AllTypes_init_zero;
alltypes.req_int32 = -1001;
alltypes.req_int64 = -1002;
alltypes.has_opt_enum = true;
alltypes.opt_enum = MyEnum_Truth;
alltypes.has_opt_emptymsg = true;
+
+ alltypes.which_oneof = AllTypes_oneof_msg1_tag;
+ strcpy(alltypes.oneof.oneof_msg1.substuff1, "4059");
+ alltypes.oneof.oneof_msg1.substuff2 = 4059;
}
alltypes.end = 1099;