From cafe83109a65b6bfd5bc0f3fd642e0833f5ebc78 Mon Sep 17 00:00:00 2001 From: defanor Date: Thu, 2 Nov 2023 15:47:16 +0300 Subject: Use Rust enums for C tagged unions Used to manually implement tagged unions in Rust as well, but the C representation of Rust enums with fields is supposed to match those. --- tests/xml_parse_and_print.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/xml_parse_and_print.c b/tests/xml_parse_and_print.c index ad6bbca..c76b06f 100644 --- a/tests/xml_parse_and_print.c +++ b/tests/xml_parse_and_print.c @@ -11,6 +11,7 @@ int main () { ""; rexmpp_xml_t *xml = rexmpp_xml_parse (str, strlen(str)); + printf("Input:\n%s\n\n", str); if (xml == NULL) { ret = -1; } else { @@ -18,6 +19,7 @@ int main () { if (str_new == NULL) { ret = -2; } else { + printf("Output:\n%s\n", str_new); ret = strcmp(str, str_new); free(str_new); } -- cgit v1.2.3