Commit 16256f55 authored by Rusty Russell's avatar Rusty Russell

darray: handle case where we don't have typeof.

Tests don't compile otherwise, so fix that up (ccanlint now tests with
reduced features, so this became clear).
parent b2e751d0
......@@ -238,11 +238,20 @@ int main(void) {
{
darray(const char*) arr = darray_new();
const char *n[9] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight"};
#if HAVE_TYPEOF
darray_appends(arr, n[5], n[6], n[7], n[8]);
#else
darray_appends_t(arr, const char *, n[5], n[6], n[7], n[8]);
#endif
ok1(darray_size(arr)==4 && darray_alloc(arr)>=4);
#if HAVE_TYPEOF
darray_prepends(arr, n[0], n[1], n[2], n[3], n[4]);
#else
darray_prepends_t(arr, const char *, n[0], n[1], n[2], n[3], n[4]);
#endif
ok1(darray_size(arr)==9 && darray_alloc(arr)>=9);
ok1(arr.item[0]==n[0] &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment