bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] argmatch: add variants that only match full argument


From: Pádraig Brady
Subject: Re: [PATCH] argmatch: add variants that only match full argument
Date: Sun, 30 Jan 2022 20:18:31 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Thunderbird/95.0

On 30/01/2022 18:58, Bruno Haible wrote:
Pádraig Brady wrote:
* lib/argmatch.h (argmatch_exact, [X]ARGMATCH_EXACT): New interfaces
that don't support abbreviations.
* lib/argmatch.c (argmatch_exact, __xargmatch_exact_internal): Likewise.
* tests/test-argmatch.c: Add tests.

The code looks correct. But I see some code duplication:
__xargmatch_exact_internal and __xargmatch_internal are very similar.
Given that both of these functions are only invoked through macros, how
about merging them into a single function? Namely, by adding an argument
of type 'bool exactp'.

Bruno

Good call.
I pushed with that adjustment.

Thanks for the review.
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]