correct FLEXPTR_* example in comment
This section is about "The FLEXPTR_* variants", so use FLEXPTR_ALLOC_STR in the example. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
8d5b3325e7
commit
0bb1519f05
@ -803,7 +803,7 @@ extern FILE *fopen_for_writing(const char *path);
|
|||||||
* you can do:
|
* you can do:
|
||||||
*
|
*
|
||||||
* struct foo *f;
|
* struct foo *f;
|
||||||
* FLEX_ALLOC_STR(f, name, src);
|
* FLEXPTR_ALLOC_STR(f, name, src);
|
||||||
*
|
*
|
||||||
* and "name" will point to a block of memory after the struct, which will be
|
* and "name" will point to a block of memory after the struct, which will be
|
||||||
* freed along with the struct (but the pointer can be repointed anywhere).
|
* freed along with the struct (but the pointer can be repointed anywhere).
|
||||||
|
Loading…
Reference in New Issue
Block a user