) + "%stypedef enum %s %s;\n" % (indent, obj.name, obj.name)
return code
- def visit_definition_struct(self, obj, indent, context):
- code = "%sstruct %s %s;\n" % (
+ def generate_cleanup(self, name, indent):
+ code = "%svoid xdr_%s_clear(%s *objp);\n" % (
indent,
- obj.name,
- self.visit_object(obj.body, indent),
- ) + "%stypedef struct %s %s;\n" % (indent, obj.name, obj.name)
+ name,
+ name,
+ ) + "%sG_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(%s, xdr_%s_clear);\n" % (
+ indent,
+ name,
+ name,
+ )
+ return code
+
+ def visit_definition_struct(self, obj, indent, context):
+ code = (
+ "%sstruct %s %s;\n"
+ % (indent, obj.name, self.visit_object(obj.body, indent))
+ + "%stypedef struct %s %s;\n" % (indent, obj.name, obj.name)
+ + self.generate_cleanup(obj.name, indent)
+ )
return code
def visit_definition_union(self, obj, indent, context):
- code = "%sstruct %s %s;\n" % (
- indent,
- obj.name,
- self.visit_object(obj.body, indent, obj.name),
- ) + "%stypedef struct %s %s;\n" % (indent, obj.name, obj.name)
+ code = (
+ "%sstruct %s %s;\n"
+ % (indent, obj.name, self.visit_object(obj.body, indent, obj.name))
+ + "%stypedef struct %s %s;\n" % (indent, obj.name, obj.name)
+ + self.generate_cleanup(obj.name, indent)
+ )
return code
def visit_definition_typedef(self, obj, indent, context):
- return "%stypedef %s;\n" % (indent, self.visit_object(obj.decl, indent))
+ code = "%stypedef %s;\n" % (
+ indent,
+ self.visit_object(obj.decl, indent),
+ ) + self.generate_cleanup(obj.decl.identifier, indent)
+ return code
def visit_declaration_scalar(self, obj, indent, context):
return "%s %s" % (self.visit_object(obj.typ, indent), obj.identifier)
return code
+class XDRTypeImplementationGenerator(XDRVisitor):
+ def visit_definition_enum(self, obj, indent, context):
+ pass
+
+ def generate_cleanup(self, name, indent):
+ code = (
+ "\n"
+ + "%svoid xdr_%s_clear(%s *objp)\n" % (indent, name, name)
+ + "%s{\n" % indent
+ + "%s xdr_free((xdrproc_t)xdr_%s, (char *)objp);\n" % (indent, name)
+ + "%s}\n" % indent
+ )
+ return code
+
+ def visit_definition_union(self, obj, indent, context):
+ return self.generate_cleanup(obj.name, indent)
+
+ def visit_definition_struct(self, obj, indent, context):
+ return self.generate_cleanup(obj.name, indent)
+
+ def visit_definition_typedef(self, obj, indent, context):
+ return self.generate_cleanup(obj.decl.identifier, indent)
+
+
class XDRMarshallDeclarationGenerator(XDRVisitor):
def visit_definition_enum(self, obj, indent, context):
return "%sextern bool_t xdr_%s(XDR *, %s*);\n" % (indent, obj.name, obj.name)
char c2;
};
typedef struct TestStruct TestStruct;
+void xdr_TestStruct_clear(TestStruct *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStruct, xdr_TestStruct_clear);
struct TestUnion {
int type;
} TestUnion_u;
};
typedef struct TestUnion TestUnion;
+void xdr_TestUnion_clear(TestUnion *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnion, xdr_TestUnion_clear);
struct TestUnionVoidDefault {
int type;
} TestUnionVoidDefault_u;
};
typedef struct TestUnionVoidDefault TestUnionVoidDefault;
+void xdr_TestUnionVoidDefault_clear(TestUnionVoidDefault *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionVoidDefault, xdr_TestUnionVoidDefault_clear);
struct TestUnionNoDefault {
int type;
} TestUnionNoDefault_u;
};
typedef struct TestUnionNoDefault TestUnionNoDefault;
+void xdr_TestUnionNoDefault_clear(TestUnionNoDefault *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionNoDefault, xdr_TestUnionNoDefault_clear);
typedef int TestIntScalar;
+void xdr_TestIntScalar_clear(TestIntScalar *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestIntScalar, xdr_TestIntScalar_clear);
typedef int *TestIntPointer;
+void xdr_TestIntPointer_clear(TestIntPointer *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestIntPointer, xdr_TestIntPointer_clear);
typedef int TestIntFixedArray[3];
+void xdr_TestIntFixedArray_clear(TestIntFixedArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestIntFixedArray, xdr_TestIntFixedArray_clear);
typedef struct {
u_int TestIntVariableArray_len;
int *TestIntVariableArray_val;
} TestIntVariableArray;
+void xdr_TestIntVariableArray_clear(TestIntVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestIntVariableArray, xdr_TestIntVariableArray_clear);
typedef char *TestStringVariableArray;
+void xdr_TestStringVariableArray_clear(TestStringVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStringVariableArray, xdr_TestStringVariableArray_clear);
typedef char TestOpaqueFixedArray[9];
+void xdr_TestOpaqueFixedArray_clear(TestOpaqueFixedArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestOpaqueFixedArray, xdr_TestOpaqueFixedArray_clear);
typedef struct {
u_int TestOpaqueVariableArray_len;
char *TestOpaqueVariableArray_val;
} TestOpaqueVariableArray;
+void xdr_TestOpaqueVariableArray_clear(TestOpaqueVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestOpaqueVariableArray, xdr_TestOpaqueVariableArray_clear);
typedef TestEnum TestEnumScalar;
+void xdr_TestEnumScalar_clear(TestEnumScalar *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestEnumScalar, xdr_TestEnumScalar_clear);
typedef TestEnum *TestEnumPointer;
+void xdr_TestEnumPointer_clear(TestEnumPointer *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestEnumPointer, xdr_TestEnumPointer_clear);
typedef TestEnum TestEnumFixedArray[13];
+void xdr_TestEnumFixedArray_clear(TestEnumFixedArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestEnumFixedArray, xdr_TestEnumFixedArray_clear);
typedef struct {
u_int TestEnumVariableArray_len;
TestEnum *TestEnumVariableArray_val;
} TestEnumVariableArray;
+void xdr_TestEnumVariableArray_clear(TestEnumVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestEnumVariableArray, xdr_TestEnumVariableArray_clear);
typedef TestStruct TestStructScalar;
+void xdr_TestStructScalar_clear(TestStructScalar *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStructScalar, xdr_TestStructScalar_clear);
typedef TestStruct *TestStructPointer;
+void xdr_TestStructPointer_clear(TestStructPointer *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStructPointer, xdr_TestStructPointer_clear);
typedef TestStruct TestStructFixedArray[17];
+void xdr_TestStructFixedArray_clear(TestStructFixedArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStructFixedArray, xdr_TestStructFixedArray_clear);
typedef struct {
u_int TestStructVariableArray_len;
TestStruct *TestStructVariableArray_val;
} TestStructVariableArray;
+void xdr_TestStructVariableArray_clear(TestStructVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStructVariableArray, xdr_TestStructVariableArray_clear);
typedef TestUnion TestUnionScalar;
+void xdr_TestUnionScalar_clear(TestUnionScalar *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionScalar, xdr_TestUnionScalar_clear);
typedef TestUnion *TestUnionPointer;
+void xdr_TestUnionPointer_clear(TestUnionPointer *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionPointer, xdr_TestUnionPointer_clear);
typedef TestUnion TestUnionFixedArray[21];
+void xdr_TestUnionFixedArray_clear(TestUnionFixedArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionFixedArray, xdr_TestUnionFixedArray_clear);
typedef struct {
u_int TestUnionVariableArray_len;
TestUnion *TestUnionVariableArray_val;
} TestUnionVariableArray;
+void xdr_TestUnionVariableArray_clear(TestUnionVariableArray *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestUnionVariableArray, xdr_TestUnionVariableArray_clear);
#define TestConstDec 25
TestUnionVariableArray tuva;
};
typedef struct TestStructAllTypes TestStructAllTypes;
+void xdr_TestStructAllTypes_clear(TestStructAllTypes *objp);
+G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TestStructAllTypes, xdr_TestStructAllTypes_clear);
extern bool_t xdr_TestEnum(XDR *, TestEnum*);
g_assert_cmpint(memcmp(buf, expected, actlen), ==, 0);
xdr_destroy(&xdr);
- /* Step 4: free mem from the new object only; the orig
- * was on the stack so leave untouched */
- xdrmem_create(&xdr, buf, buflen, XDR_FREE);
-
- ret = !!proc(&xdr, vnew);
- g_assert_cmpint(ret, ==, true);
-
cleanup:
xdr_destroy(&xdr);
}
TestStruct vorig = {
.c1 = 'a', .c2 = 'b',
};
- TestStruct vnew = {0};
+ g_auto(TestStruct) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStruct, &vorig, &vnew, "struct", false);
}
TestUnion vorig = {
.type = 20, .TestUnion_u = { .i1 = 1729 },
};
- TestUnion vnew = {0};
+ g_auto(TestUnion) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnion, &vorig, &vnew, "union_case", false);
}
TestUnion vorig = {
.type = 87539319, .TestUnion_u = { .i3 = 1729 },
};
- TestUnion vnew = {0};
+ g_auto(TestUnion) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnion, &vorig, &vnew, "union_default", false);
}
TestUnionVoidDefault vorig = {
.type = 21, .TestUnionVoidDefault_u = { .i1 = 1729 },
};
- TestUnionVoidDefault vnew = {0};
+ g_auto(TestUnionVoidDefault) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionVoidDefault, &vorig, &vnew, "union_void_default_case", false);
}
TestUnionVoidDefault vorig = {
.type = 87539319
};
- TestUnionVoidDefault vnew = {0};
+ g_auto(TestUnionVoidDefault) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionVoidDefault, &vorig, &vnew, "union_void_default_default", false);
}
TestUnionNoDefault vorig = {
.type = 22, .TestUnionNoDefault_u = { .i1 = 1729 },
};
- TestUnionNoDefault vnew = {0};
+ g_auto(TestUnionNoDefault) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionNoDefault, &vorig, &vnew, "union_no_default_case", false);
}
TestUnionNoDefault vorig = {
.type = 87539319,
};
- TestUnionNoDefault vnew = {0};
+ g_auto(TestUnionNoDefault) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionNoDefault, &vorig, &vnew, "union_no_default_default", true);
}
static void test_int_scalar(void)
{
TestIntScalar vorig = 1729;
- TestIntScalar vnew = 0;
+ g_auto(TestIntScalar) vnew = 0;
test_xdr((xdrproc_t)xdr_TestIntScalar, &vorig, &vnew, "int_scalar", false);
}
{
int vorigp = 1729;
TestIntPointer vorig = &vorigp;
- TestIntPointer vnew = NULL;
+ g_auto(TestIntPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestIntPointer, &vorig, &vnew, "int_pointer_set", false);
}
static void test_int_pointer_null(void)
{
TestIntPointer vorig = NULL;
- TestIntPointer vnew = NULL;
+ g_auto(TestIntPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestIntPointer, &vorig, &vnew, "int_pointer_null", false);
}
static void test_int_fixed_array(void)
{
TestIntFixedArray vorig = { 1729, 0, 87539319 };
- TestIntFixedArray vnew = {0};
+ g_auto(TestIntFixedArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestIntFixedArray,
vorig, vnew, "int_fixed_array", false);
.TestIntVariableArray_len = 3,
.TestIntVariableArray_val = (int[]) { 1729, 0, 87539319 }
};
- TestIntVariableArray vnew = {0};
+ g_auto(TestIntVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestIntVariableArray,
&vorig, &vnew, "int_variable_array_set", false);
.TestIntVariableArray_len = 6,
.TestIntVariableArray_val = (int[]) { 1729, 0, 87539319, 0, 1729 }
};
- TestIntVariableArray vnew = {0};
+ g_auto(TestIntVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestIntVariableArray,
&vorig, &vnew, "int_variable_array_overflow", true);
.TestIntVariableArray_len = 0,
.TestIntVariableArray_val = (int[]) {0},
};
- TestIntVariableArray vnew = {0};
+ g_auto(TestIntVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestIntVariableArray,
&vorig, &vnew, "int_variable_array_empty", false);
static void test_string_variable_array_set(void)
{
TestStringVariableArray vorig = (TestStringVariableArray) "taxis";
- TestStringVariableArray vnew = NULL;
+ g_auto(TestStringVariableArray) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestStringVariableArray,
&vorig, &vnew, "string_variable_array_set", false);
static void test_string_variable_array_empty(void)
{
TestStringVariableArray vorig = (TestStringVariableArray)"";
- TestStringVariableArray vnew = NULL;
+ g_auto(TestStringVariableArray) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestStringVariableArray,
&vorig, &vnew, "string_variable_array_empty", false);
static void test_opaque_fixed_array(void)
{
TestOpaqueFixedArray vorig = { 0xca, 0xfe, 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78 };
- TestOpaqueFixedArray vnew = {0};
+ g_auto(TestOpaqueFixedArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestOpaqueFixedArray, vorig, vnew, "opaque_fixed_array", false);
}
.TestOpaqueVariableArray_len = 3,
.TestOpaqueVariableArray_val = (char[]) { 0xca, 0xfe, 0x12 },
};
- TestOpaqueVariableArray vnew = {0};
+ g_auto(TestOpaqueVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestOpaqueVariableArray,
&vorig, &vnew, "opaque_variable_array_set", false);
0xca, 0xfe, 0x12, 0xca, 0xfe, 0x12,
},
};
- TestOpaqueVariableArray vnew = {0};
+ g_auto(TestOpaqueVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestOpaqueVariableArray,
&vorig, &vnew, "opaque_variable_array_overflow", true);
.TestOpaqueVariableArray_len = 0,
.TestOpaqueVariableArray_val = (char[]) {0},
};
- TestOpaqueVariableArray vnew = {0};
+ g_auto(TestOpaqueVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestOpaqueVariableArray,
&vorig, &vnew, "opaque_variable_array_empty", false);
static void test_enum_scalar(void)
{
TestEnumScalar vorig = TEST_ENUM_TWO;
- TestEnumScalar vnew = 0;
+ g_auto(TestEnumScalar) vnew = 0;
test_xdr((xdrproc_t)xdr_TestEnumScalar,
&vorig, &vnew, "enum_scalar", false);
{
TestEnum vorigp = TEST_ENUM_TWO;
TestEnumPointer vorig = &vorigp;
- TestEnumPointer vnew = NULL;
+ g_auto(TestEnumPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestEnumPointer,
&vorig, &vnew, "enum_pointer_set", false);
static void test_enum_pointer_null(void)
{
TestEnumPointer vorig = NULL;
- TestEnumPointer vnew = NULL;
+ g_auto(TestEnumPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestEnumPointer,
&vorig, &vnew, "enum_pointer_null", false);
TEST_ENUM_ONE, TEST_ENUM_TWO, TEST_ENUM_ONE, TEST_ENUM_TWO,
TEST_ENUM_ONE, TEST_ENUM_TWO, TEST_ENUM_ONE
};
- TestEnumFixedArray vnew = {0};
+ g_auto(TestEnumFixedArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestEnumFixedArray, vorig, vnew, "enum_fixed_array", false);
}
TEST_ENUM_ONE, TEST_ENUM_TWO, TEST_ENUM_ONE,
},
};
- TestEnumVariableArray vnew = {0};
+ g_auto(TestEnumVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestEnumVariableArray,
&vorig, &vnew, "enum_variable_array_set", false);
TEST_ENUM_ONE, TEST_ENUM_TWO, TEST_ENUM_ONE, TEST_ENUM_TWO,
}
};
- TestEnumVariableArray vnew = {0};
+ g_auto(TestEnumVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestEnumVariableArray,
&vorig, &vnew, "enum_variable_array_overflow", true);
.TestEnumVariableArray_len = 0,
.TestEnumVariableArray_val = (TestEnum[]) {0},
};
- TestEnumVariableArray vnew = {0};
+ g_auto(TestEnumVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestEnumVariableArray,
&vorig, &vnew, "enum_variable_array_empty", false);
static void test_struct_scalar(void)
{
TestStructScalar vorig = TEST_STRUCT_INIT;
- TestStructScalar vnew = {0};
+ g_auto(TestStructScalar) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructScalar,
&vorig, &vnew, "struct_scalar", false);
{
TestStruct vorigp = TEST_STRUCT_INIT;
TestStructPointer vorig = &vorigp;
- TestStructPointer vnew = NULL;
+ g_auto(TestStructPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestStructPointer,
&vorig, &vnew, "struct_pointer_set", false);
static void test_struct_pointer_null(void)
{
TestStructPointer vorig = NULL;
- TestStructPointer vnew = NULL;
+ g_auto(TestStructPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestStructPointer,
&vorig, &vnew, "struct_pointer_null", false);
TEST_STRUCT_INIT_ALT, TEST_STRUCT_INIT_ALT, TEST_STRUCT_INIT, TEST_STRUCT_INIT,
TEST_STRUCT_INIT_ALT
};
- TestStructFixedArray vnew = {0};
+ g_auto(TestStructFixedArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructFixedArray, vorig, vnew, "struct_fixed_array", false);
}
TEST_STRUCT_INIT, TEST_STRUCT_INIT_ALT, TEST_STRUCT_INIT_ALT,
},
};
- TestStructVariableArray vnew = {0};
+ g_auto(TestStructVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructVariableArray,
&vorig, &vnew, "struct_variable_array_set", false);
TEST_STRUCT_INIT, TEST_STRUCT_INIT, TEST_STRUCT_INIT, TEST_STRUCT_INIT,
}
};
- TestStructVariableArray vnew = {0};
+ g_auto(TestStructVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructVariableArray,
&vorig, &vnew, "struct_variable_array_overflow", true);
.TestStructVariableArray_len = 0,
.TestStructVariableArray_val = (TestStruct[]) {},
};
- TestStructVariableArray vnew = {0};
+ g_auto(TestStructVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructVariableArray,
&vorig, &vnew, "struct_variable_array_empty", false);
static void test_union_scalar(void)
{
TestUnionScalar vorig = TEST_UNION_INIT;
- TestUnionScalar vnew = {0};
+ g_auto(TestUnionScalar) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionScalar,
&vorig, &vnew, "union_scalar", false);
{
TestUnion vorigp = TEST_UNION_INIT;
TestUnionPointer vorig = &vorigp;
- TestUnionPointer vnew = NULL;
+ g_auto(TestUnionPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestUnionPointer,
&vorig, &vnew, "union_pointer_set", false);
static void test_union_pointer_null(void)
{
TestUnionPointer vorig = NULL;
- TestUnionPointer vnew = NULL;
+ g_auto(TestUnionPointer) vnew = NULL;
test_xdr((xdrproc_t)xdr_TestUnionPointer,
&vorig, &vnew, "union_pointer_null", false);
TEST_UNION_INIT_ALT, TEST_UNION_INIT_ALT, TEST_UNION_INIT, TEST_UNION_INIT,
TEST_UNION_INIT_ALT
};
- TestUnionFixedArray vnew = {0};
+ g_auto(TestUnionFixedArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionFixedArray, vorig, vnew, "union_fixed_array", false);
}
TEST_UNION_INIT, TEST_UNION_INIT_ALT, TEST_UNION_INIT_ALT,
},
};
- TestUnionVariableArray vnew = {0};
+ g_auto(TestUnionVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionVariableArray,
&vorig, &vnew, "union_variable_array_set", false);
TEST_UNION_INIT, TEST_UNION_INIT, TEST_UNION_INIT, TEST_UNION_INIT,
}
};
- TestUnionVariableArray vnew = {0};
+ g_auto(TestUnionVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionVariableArray,
&vorig, &vnew, "union_variable_array_overflow", true);
.TestUnionVariableArray_len = 0,
.TestUnionVariableArray_val = (TestUnion[]) {},
};
- TestUnionVariableArray vnew = {0};
+ g_auto(TestUnionVariableArray) vnew = {0};
test_xdr((xdrproc_t)xdr_TestUnionVariableArray,
&vorig, &vnew, "union_variable_array_empty", false);
},
},
};
- TestStructAllTypes vnew = {0};
+ g_auto(TestStructAllTypes) vnew = {0};
test_xdr((xdrproc_t)xdr_TestStructAllTypes,
&vorig, &vnew, "test_struct_all_types", false);