summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util/u_dynarray.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/u_dynarray.h b/src/util/u_dynarray.h
index 57f96ff79c0..cc316323f28 100644
--- a/src/util/u_dynarray.h
+++ b/src/util/u_dynarray.h
@@ -68,6 +68,12 @@ util_dynarray_fini(struct util_dynarray *buf)
}
}
+static inline void
+util_dynarray_clear(struct util_dynarray *buf)
+{
+ buf->size = 0;
+}
+
#define DYN_ARRAY_INITIAL_SIZE 64
/* use util_dynarray_trim to reduce the allocated storage */