projects
/
rrq
/
rrqmisc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ad029d0
)
added convenience callbacks
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 9 Jul 2022 09:28:54 +0000
(19:28 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sat, 9 Jul 2022 09:28:54 +0000
(19:28 +1000)
vector/vector.h
patch
|
blob
|
history
diff --git
a/vector/vector.h
b/vector/vector.h
index 3cbd93562ad9bf59183271c3c5e4b4475809bb36..4dc61f8ee793d2429a7807c56c07a060a8f0bf32 100644
(file)
--- a/
vector/vector.h
+++ b/
vector/vector.h
@@
-377,4
+377,20
@@
extern vector_index vector_find(vector *pv,void *value);
*/
extern vector_index vector_next_unused(vector *pv,vector_index index);
*/
extern vector_index vector_next_unused(vector *pv,vector_index index);
+/**
+ * \brief Convenience callback function for vector shrinking to free
+ * any existing slot assignment.
+ *
+ * \related vector
+ */
+extern int vector_free_any(vector *pv,vector_index ix,void *item,void *data);
+
+/**
+ * \brief Convenience callback function for vector shrinking to ignore
+ * any existing slot assignment (without free-ing them).
+ *
+ * \related vector
+ */
+extern int vector_clear_any(vector *pv,vector_index ix,void *item,void *data);
+
#endif
#endif