summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-01-19 15:10:27 -0500
committerDave Barach <dave@barachs.net>2016-01-19 15:10:35 -0500
commit2bc1ebaf385968acd4ffbaace206a704befbaa26 (patch)
treedaa6de2427f8bd7d9633247dedbab62bd702464c
parent7471c6d7d7e18a8515e49537eb88c8cf7ca6279c (diff)
Clean up comment
Change-Id: I487321624d3625e32e661ca378716ec083ce3ce2 Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r--vppinfra/vppinfra/vec.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/vppinfra/vppinfra/vec.h b/vppinfra/vppinfra/vec.h
index 3e8d7c023a4..79954f3dbd1 100644
--- a/vppinfra/vppinfra/vec.h
+++ b/vppinfra/vppinfra/vec.h
@@ -59,10 +59,13 @@
...
~~~~~~~~
- A user is returned a pointer to element # 1.
- Null pointer vectors are valid and mean a zero length vector.
- You can also have an allocated non-null zero length vector by just
- setting the vector length field to zero (e.g. _vec_len (v) = 0).
+ The user pointer contains the address of vector element # 0. Null
+ pointer vectors are valid and mean a zero length vector.
+
+ You can reset the length of an allocated vector to zero via the
+ vec_reset_length(v) macro, or by setting the vector length field to
+ zero (e.g. _vec_len (v) = 0). Vec_reset_length(v) preferred: it
+ understands Null pointers.
Typically, the header is not present. Headers allow for other
data structures to be built atop CLIB vectors.