Fix comment in strbuf.h to use correct name strbuf_avail()
Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
9b3beb5812
commit
a1f611d5d0
8
strbuf.h
8
strbuf.h
@ -23,12 +23,12 @@
|
|||||||
* that way:
|
* that way:
|
||||||
*
|
*
|
||||||
* strbuf_grow(sb, SOME_SIZE);
|
* strbuf_grow(sb, SOME_SIZE);
|
||||||
* // ... here the memory areay starting at sb->buf, and of length
|
* ... Here, the memory array starting at sb->buf, and of length
|
||||||
* // sb_avail(sb) is all yours, and you are sure that sb_avail(sb) is at
|
* ... strbuf_avail(sb) is all yours, and you are sure that
|
||||||
* // least SOME_SIZE
|
* ... strbuf_avail(sb) is at least SOME_SIZE.
|
||||||
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
|
* strbuf_setlen(sb, sb->len + SOME_OTHER_SIZE);
|
||||||
*
|
*
|
||||||
* Of course, SOME_OTHER_SIZE must be smaller or equal to sb_avail(sb).
|
* Of course, SOME_OTHER_SIZE must be smaller or equal to strbuf_avail(sb).
|
||||||
*
|
*
|
||||||
* Doing so is safe, though if it has to be done in many places, adding the
|
* Doing so is safe, though if it has to be done in many places, adding the
|
||||||
* missing API to the strbuf module is the way to go.
|
* missing API to the strbuf module is the way to go.
|
||||||
|
Loading…
Reference in New Issue
Block a user