[v4,0/6] refine argparse library

Message ID 20240318111838.16991-1-fengchengwen@huawei.com (mailing list archive)
Headers
Series refine argparse library |

Message

fengchengwen March 18, 2024, 11:18 a.m. UTC
  I found a couple of issues when I revisited the argparse_autotest
output, so got this patchset.

Chengwen Feng (6):
  argparse: refine error message
  argparse: remove dead code
  argparse: replace flag enum with marco
  argparse: fix argument flags operate as uint32 type
  test/argparse: refine testcases
  argparse: fix doc don't display two hyphens

---
v4: address Thomas's comment on 4/6 commit:
- remove unused macros TEST_ARGPARSE_FLAG_HAS_ARG_BITMASK and
  TEST_ARGPARSE_FLAG_VAL_TYPE_BITMASK.
v3:
- address Thomas's comment on 4/6 comit.
- add commit: fix doc don't display two hyphens.
v2: address David Marchand's comment:
- replace flag enum with marco.
- replace flag's hardcode with macro in test_argparse.c.

 app/test/test_argparse.c               | 65 +++++++++++---------
 doc/guides/prog_guide/argparse_lib.rst | 47 +++++++-------
 lib/argparse/rte_argparse.c            | 61 +++++++++---------
 lib/argparse/rte_argparse.h            | 85 ++++++++++++--------------
 4 files changed, 127 insertions(+), 131 deletions(-)
  

Comments

Thomas Monjalon March 21, 2024, 5:27 p.m. UTC | #1
18/03/2024 12:18, Chengwen Feng:
> I found a couple of issues when I revisited the argparse_autotest
> output, so got this patchset.
> 
> Chengwen Feng (6):
>   argparse: refine error message
>   argparse: remove dead code
>   argparse: replace flag enum with marco
>   argparse: fix argument flags operate as uint32 type
>   test/argparse: refine testcases
>   argparse: fix doc don't display two hyphens

I'd like to get an approval from someone else for the API changes here.
I feel it is better to wait post 24.03.
Anyway it is a fresh experimental API.
  
fengchengwen March 22, 2024, 1:24 a.m. UTC | #2
Hi Thomas,

On 2024/3/22 1:27, Thomas Monjalon wrote:
> 18/03/2024 12:18, Chengwen Feng:
>> I found a couple of issues when I revisited the argparse_autotest
>> output, so got this patchset.
>>
>> Chengwen Feng (6):
>>   argparse: refine error message
>>   argparse: remove dead code
>>   argparse: replace flag enum with marco
>>   argparse: fix argument flags operate as uint32 type
>>   test/argparse: refine testcases
>>   argparse: fix doc don't display two hyphens
> 
> I'd like to get an approval from someone else for the API changes here.
> I feel it is better to wait post 24.03.
> Anyway it is a fresh experimental API.

That's OK

Thanks

> 
> 
> 
> .
>
  
fengchengwen May 8, 2024, 9:10 a.m. UTC | #3
Hi Thomas,

On 2024/3/22 1:27, Thomas Monjalon wrote:
> 18/03/2024 12:18, Chengwen Feng:
>> I found a couple of issues when I revisited the argparse_autotest
>> output, so got this patchset.
>>
>> Chengwen Feng (6):
>>   argparse: refine error message
>>   argparse: remove dead code
>>   argparse: replace flag enum with marco
>>   argparse: fix argument flags operate as uint32 type
>>   test/argparse: refine testcases
>>   argparse: fix doc don't display two hyphens
> 
> I'd like to get an approval from someone else for the API changes here.
> I feel it is better to wait post 24.03.
> Anyway it is a fresh experimental API.

Could you review this patchset and merge?
BTW: this patchset also fixes bug 1409

Thanks

> 
> 
> 
> .
>