Skip to contentSkip to conversation

argparse: fix parser callback type name

PATCH Applied David Marchand 4 participants 4 messages Mar 7, 2024 – Mar 21, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 argparse: fix parser callback type name

All types exposed in a public header must be prefixed with rte_.

Fixes e3e579f5bab5 ("argparse: introduce argparse library")
---
 lib/argparse/rte_argparse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/argparse/rte_argparse.h +2 -2
index 47e231bef9..5e5936f96c 100644
@@ -144,7 +144,7 @@ struct rte_argparse_arg {
  * @return
  *   0 on success. Otherwise negative value is returned.
  */
-typedef int (*arg_parser_t)(uint32_t index, const char *value, void *opaque);
+typedef int (*rte_arg_parser_t)(uint32_t index, const char *value, void *opaque);
 
 /**
  * A structure used to hold argparse's configuration.
@@ -161,7 +161,7 @@ struct rte_argparse {
 	/** Whether exit when error. */
 	bool exit_on_error;
 	/** User callback for parsing arguments. */
-	arg_parser_t callback;
+	rte_arg_parser_t callback;
 	/** Opaque which used to invoke callback. */
 	void *opaque;
 	/** Reserved field used for future extension. */
Signature · 1 line
2.44.0
Acked-by on v1 1/1
#3 lore raw
In reply to David Marchand
Quoted 32 lines · David Marchand

All types exposed in a public header must be prefixed with rte_.

Fixes e3e579f5bab5 ("argparse: introduce argparse library")
---
 lib/argparse/rte_argparse.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/argparse/rte_argparse.h +2 -2
index 47e231bef9..5e5936f96c 100644
@@ -144,7 +144,7 @@ struct rte_argparse_arg {
  * @return
  *   0 on success. Otherwise negative value is returned.
  */
-typedef int (*arg_parser_t)(uint32_t index, const char *value, void *opaque);
+typedef int (*rte_arg_parser_t)(uint32_t index, const char *value, void *opaque);
 
 /**
  * A structure used to hold argparse's configuration.
@@ -161,7 +161,7 @@ struct rte_argparse {
 	/** Whether exit when error. */
 	bool exit_on_error;
 	/** User callback for parsing arguments. */
-	arg_parser_t callback;
+	rte_arg_parser_t callback;
 	/** Opaque which used to invoke callback. */
 	void *opaque;
 	/** Reserved field used for future extension. */