From: Philippe Proulx Date: Tue, 1 Jun 2021 14:19:54 +0000 (-0400) Subject: Rename argpar_iter_get_ingested_orig_args() -> argpar_iter_ingested_orig_args() X-Git-Url: http://git.efficios.com/?p=argpar.git;a=commitdiff_plain;h=f3ab5ca1c03d5ae622ac53b7c1da30ebd21db199 Rename argpar_iter_get_ingested_orig_args() -> argpar_iter_ingested_orig_args() Personal preference when naming property getters. Signed-off-by: Philippe Proulx Change-Id: I8bb454da0bc12ce638bdea55d1eb9a4eb3fdfff7 --- diff --git a/argpar/argpar.c b/argpar/argpar.c index 5a8a302..f324d7f 100644 --- a/argpar/argpar.c +++ b/argpar/argpar.c @@ -766,7 +766,7 @@ end: } ARGPAR_HIDDEN -unsigned int argpar_iter_get_ingested_orig_args( +unsigned int argpar_iter_ingested_orig_args( const struct argpar_iter * const iter) { return iter->i; @@ -809,7 +809,7 @@ struct argpar_parse_ret argpar_parse(const unsigned int argc, case ARGPAR_ITER_NEXT_STATUS_ERROR_UNKNOWN_OPT: if (fail_on_unknown_opt) { parse_ret.ingested_orig_args = - argpar_iter_get_ingested_orig_args(iter); + argpar_iter_ingested_orig_args(iter); goto error; } @@ -832,7 +832,7 @@ struct argpar_parse_ret argpar_parse(const unsigned int argc, success: ARGPAR_ASSERT(!parse_ret.error); - parse_ret.ingested_orig_args = argpar_iter_get_ingested_orig_args(iter); + parse_ret.ingested_orig_args = argpar_iter_ingested_orig_args(iter); goto end; error: diff --git a/argpar/argpar.h b/argpar/argpar.h index 1fb8835..67056c3 100644 --- a/argpar/argpar.h +++ b/argpar/argpar.h @@ -362,7 +362,7 @@ enum argpar_iter_next_status argpar_iter_next( * the previously returned items. */ ARGPAR_HIDDEN -unsigned int argpar_iter_get_ingested_orig_args(const struct argpar_iter *iter); +unsigned int argpar_iter_ingested_orig_args(const struct argpar_iter *iter); /* * Destroys `item`, as created by argpar_iter_next(). diff --git a/tests/test_argpar.c b/tests/test_argpar.c index f9f8f49..4882d45 100644 --- a/tests/test_argpar.c +++ b/tests/test_argpar.c @@ -225,9 +225,9 @@ void test_succeed_argpar_iter(const char * const cmdline, append_to_res_str(res_str, item); } - actual_ingested_orig_args = argpar_iter_get_ingested_orig_args(iter); + actual_ingested_orig_args = argpar_iter_ingested_orig_args(iter); ok(actual_ingested_orig_args == expected_ingested_orig_args, - "argpar_iter_get_ingested_orig_args() returns the expected " + "argpar_iter_ingested_orig_args() returns the expected " "number of ingested original arguments for command line `%s`", cmdline);