strvec: use correct member name in comments
In d70a9eb611 (strvec: rename struct fields, 2020-07-28), we renamed the "argv" member to "v". In the same patch we also did the following rename in strvec.c: -void strvec_pushv(struct strvec *array, const char **argv) +void strvec_pushv(struct strvec *array, const char **items) and it appears that this s/argv/items operation was erroneously applied to strvec.h. Rename "items" to "v". Signed-off-by: Linus Arver <linusa@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Linus Arver committed
Jan 12, 2024 at 07:06 UTC
f10b0989b8d34b9677ee7b07194296f999815378
1 file changed
+4
-4
strvec.h
+4
-4
@@ -4,8 +4,8 @@
4
/**
5
* The strvec API allows one to dynamically build and store
6
* NULL-terminated arrays of strings. A strvec maintains the invariant that the
7
- * `items` member always points to a non-NULL array, and that the array is
8
- * always NULL-terminated at the element pointed to by `items[nr]`. This
7
+ * `v` member always points to a non-NULL array, and that the array is
8
+ * always NULL-terminated at the element pointed to by `v[nr]`. This
9
* makes the result suitable for passing to functions expecting to receive
10
* argv from main().
11
*
@@ -22,7 +22,7 @@ extern const char *empty_strvec[];
22
23
/**
24
* A single array. This should be initialized by assignment from
25
- * `STRVEC_INIT`, or by calling `strvec_init`. The `items`
25
+ * `STRVEC_INIT`, or by calling `strvec_init`. The `v`
26
* member contains the actual array; the `nr` member contains the
27
* number of elements in the array, not including the terminating
28
* NULL.
@@ -80,7 +80,7 @@ void strvec_split(struct strvec *, const char *);
80
void strvec_clear(struct strvec *);
81
82
/**
83
- * Disconnect the `items` member from the `strvec` struct and
83
+ * Disconnect the `v` member from the `strvec` struct and
84
* return it. The caller is responsible for freeing the memory used
85
* by the array, and by the strings it references. After detaching,
86
* the `strvec` is in a reinitialized state and can be pushed