search for: int64_vector_sort

Displaying 2 results from an estimated 2 matches for "int64_vector_sort".

2020 Jul 07
0
[nbdkit PATCH 1/3] vector: Add VECT_remove
...d) { int64_vector v = empty_vector; size_t i; int r; + int64_t tmp, *p; for (i = 0; i < 10; ++i) { - r = int64_vector_append (&v, i); + r = int64_vector_insert (&v, i, 0); assert (r == 0); } + + for (i = 0; i < 10; ++i) + assert (v.ptr[i] == 9 - i); + int64_vector_sort (&v, compare); for (i = 0; i < 10; ++i) assert (v.ptr[i] == i); + + r = int64_vector_remove (&v, 1); + assert (r == 0); + assert (v.size == 9); + assert (v.ptr[1] == 2); + + tmp = 10; + p = int64_vector_search (&v, &tmp, (void*) compare); + assert (p == NULL); + t...
2020 Jul 07
6
[RFC nbdkit PATCH 0/3] aligned .extents
Ultimately, both the blocksize and swab filters want to return aligned extents to the client. I'm posting this as a snapshot of my work in progress on how I plan to get there (it's not quite working yet, but I'm done for today and wanted to at least document my ideas). I might also add a convenience function for nbdkit_extents_offset, since we have a number of filters that repeat the