Displaying 2 results from an estimated 2 matches for "int64_vector_remov".
Did you mean:
int64_vector_remove
2020 Jul 07
0
[nbdkit PATCH 1/3] vector: Add VECT_remove
...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);
+ tmp = 8;
+ p = int64_vector_search (&v, &tmp, (void*) compare);
+ assert (p == &v.ptr[7]);
+...
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