summaryrefslogtreecommitdiff
path: root/lib/command.h
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2017-01-24 21:16:23 -0500
committerGitHub <noreply@github.com>2017-01-24 21:16:23 -0500
commit9ffaae7a4f175db9f2ad907d2f423c24277bbf70 (patch)
treec0e48ac257605cd47d80f79dcdd8a9555aaef322 /lib/command.h
parentac9ddce37d16af4e36c1ff945c12aaaf615e69d8 (diff)
parent83364d20d5667c3b43e1e672d2166c22b6fd8cf5 (diff)
Merge pull request #114 from opensourcerouting/parser-mtypes
lib: parser: fix memory management
Diffstat (limited to 'lib/command.h')
-rw-r--r--lib/command.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/command.h b/lib/command.h
index 1e1698fc7d..1e490cc4cd 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -31,6 +31,7 @@
#include "hash.h"
DECLARE_MTYPE(HOST)
+DECLARE_MTYPE(CMD_ARG)
/* for test-commands.c */
DECLARE_MTYPE(STRVEC)
@@ -420,12 +421,10 @@ extern void cmd_exit (struct vty *vty);
extern int cmd_list_cmds (struct vty *vty, int do_permute);
/* memory management for cmd_token */
-struct cmd_token *
-new_cmd_token (enum cmd_token_type, u_char attr, char *, char *);
-void
-del_cmd_token (struct cmd_token *);
-struct cmd_token *
-copy_cmd_token (struct cmd_token *);
+extern struct cmd_token *new_cmd_token (enum cmd_token_type, u_char attr,
+ const char *text, const char *desc);
+extern void del_cmd_token (struct cmd_token *);
+extern struct cmd_token *copy_cmd_token (struct cmd_token *);
extern void command_parse_format (struct graph *graph, struct cmd_element *cmd);