From a29790113ff3345f42834c3d9be99bb8055ff071 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 1 Jun 2021 11:30:15 -0400 Subject: [PATCH] argpar.h: argpar_iter_create(): add iterator lifetime details Signed-off-by: Philippe Proulx Change-Id: I57be39db6b3b5dd149ccdb82a5971fffa3c68264 --- argpar/argpar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/argpar/argpar.h b/argpar/argpar.h index 9da99d3..453f533 100644 --- a/argpar/argpar.h +++ b/argpar/argpar.h @@ -290,7 +290,9 @@ void argpar_parse_ret_fini(struct argpar_parse_ret *ret); * actually start parsing the arguments. * * `*argv` and `*descrs` must NOT change for the lifetime of the - * returned iterator (until you call argpar_iter_destroy()). + * returned iterator (until you call argpar_iter_destroy()) and for the + * lifetime of any parsing item (until you call argpar_item_destroy()) + * argpar_iter_next() creates for the returned iterator. * * Call argpar_iter_next() with the returned iterator to obtain the next * parsing result (item). -- 2.34.1