fix memory leaks
This commit is contained in:
@@ -73,16 +73,6 @@ struct b_command_option {
|
||||
struct b_queue_entry opt_entry;
|
||||
};
|
||||
|
||||
struct b_arglist_option {
|
||||
unsigned int opt_id;
|
||||
struct b_btree opt_values;
|
||||
struct b_btree_node opt_node;
|
||||
};
|
||||
|
||||
struct b_arglist {
|
||||
struct b_btree list_options;
|
||||
};
|
||||
|
||||
struct b_command_arg {
|
||||
unsigned int arg_id;
|
||||
char *arg_name;
|
||||
@@ -94,6 +84,16 @@ struct b_command_arg {
|
||||
struct b_queue_entry arg_entry;
|
||||
};
|
||||
|
||||
struct b_arglist_option {
|
||||
unsigned int opt_id;
|
||||
struct b_btree opt_values;
|
||||
struct b_btree_node opt_node;
|
||||
};
|
||||
|
||||
struct b_arglist {
|
||||
struct b_btree list_options;
|
||||
};
|
||||
|
||||
extern struct b_command *b_command_get_subcommand_with_name(
|
||||
struct b_command *cmd, const char *name);
|
||||
extern struct b_command *b_command_get_subcommand_with_long_name(
|
||||
@@ -107,7 +107,11 @@ extern struct b_command_option *b_command_get_option_with_short_name(
|
||||
struct b_command *cmd, char short_name);
|
||||
|
||||
extern struct b_command_option *b_command_option_create(void);
|
||||
extern void b_command_option_destroy(struct b_command_option *opt);
|
||||
|
||||
extern struct b_command_arg *b_command_arg_create(void);
|
||||
extern void b_command_arg_destroy(struct b_command_arg *arg);
|
||||
|
||||
extern struct b_arglist *b_arglist_create(void);
|
||||
extern b_status b_arglist_parse(
|
||||
struct b_arglist *args, struct b_command **cmd, int argc,
|
||||
|
||||
Reference in New Issue
Block a user