*
* \param hv is the \ref hashvector concerned.
*
- * \param pv is the \ref vector to copy the content into.
+ * \param variant is the desired vector variant.
*
- * \returns \b -1 if the required resizing of the \ref vector to the
- * \ref hashvector \b fill fails, otherwise \b 0 after having copied
- * the hashvector items in their internal order of appearance into the
- * \ref vector.
+ * \param pv is the optional \ref vector to copy the content into.
+ *
+ * \returns the \ref vector with the \ref hashvector content
+ *
+ * If \pv is null, then a new vector is allocated and handed out for
+ * the caller to reclaim unless the hashvector is empty in which case
+ * this function returns 0.
+ *
+ * If \b pv is not null, it is first cleared, and then populated with
+ * the content from the hashvector. The populated vector is returned.
*
* \related hashvector
*/
-extern int hashvector_contents(hashvector *hv,vector *pv);
+extern vector *hashvector_contents(
+ hashvector *hv,enum vector_variant variant,vector *pv);
/**
* \brief This is a utility function to compute and return a hashcode