X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=vector%2Fhashvector.h;h=b57aede5a0a5e9241993adb6aab4b324c87e4596;hb=1598c2a362fec3de547616cb8020a315631a4c15;hp=2754fb1fc737ed674821e11cd98b43193770434c;hpb=cf8f9e77edd9eecf9dec49314a454d997caebd80;p=rrq%2Frrqmisc.git diff --git a/vector/hashvector.h b/vector/hashvector.h index 2754fb1..b57aede 100644 --- a/vector/hashvector.h +++ b/vector/hashvector.h @@ -134,16 +134,23 @@ extern int hashvector_delete(hashvector *hv,void *item); * * \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