-// Copy items into a vector. Returns 0 on success and -1 on failure.
-int hashvector_contents(hashvector *hv,vector *pv) {
- if ( vector_resize( pv, hv->fill, 0, 0 ) ) {
- return -1;
- }
- unsigned long from = 0;
- unsigned long to = 0;
- while ( to < hv->fill ) {
- void **slot = vector_next_used( &hv->table, &from, 0, 0 );
- if ( slot ) {
- if ( *slot != HV_HOLE ) {
- vector_set( pv, to++, *slot );
- }
- from++;
- } else {
- break;
+vector *hashvector_contents(
+ hashvector *hv,enum vector_variant variant,vector *v)
+{
+ if ( v == 0 ) {
+ if ( hv->fill == 0 ) {
+ return 0;