Add M_INIT_VAI to initialize a container with a VA.

(pretty much like it was done for ALGO).
Use if for array & list so that you can init them in M_LET
by giving it a VA.
This commit is contained in:
Patrick Pelissier committed 2018-09-01 21:12:02 +02:00
1 parent 0e717389c1
commit 822c27399c
4 files changed
+17 -2

No files matched your search

+5
View File
@@ -618,6 +618,11 @@ static void test_out_default_oplist(void)
assert (list_int_equal_p(l2, list));
fclose(f);
}
M_LET(str, string_t)
M_LET( (list, 1, 2, 3, 4, 5), list_int_t) {
list_int_get_str(str, list, false);
assert (string_equal_str_p(str, "[5,4,3,2,1]"));
}
}
#else
static void test_out_default_oplist(void)