aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Manuel Stoeckl <code@mstoeckl.com>2021-02-02 19:54:35 -0500
committerLibravatar Simon Ser <contact@emersion.fr>2021-02-04 09:49:06 +0100
commitcb3c7276324b5b0862088df9ffe5498998edae91 (patch)
treeb4576f3715e53300794f92e4c6339df0ac1e447a /include
parentxdg-foreign: add v1 and v2 implementations (diff)
downloadsway-cb3c7276324b5b0862088df9ffe5498998edae91.tar.gz
sway-cb3c7276324b5b0862088df9ffe5498998edae91.tar.zst
sway-cb3c7276324b5b0862088df9ffe5498998edae91.zip
Declare all struct cmd_handler arrays const
And make the functions handling these arrays use const types.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 964b3661..29a6bec3 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -46,8 +46,8 @@ enum expected_args {
46struct cmd_results *checkarg(int argc, const char *name, 46struct cmd_results *checkarg(int argc, const char *name,
47 enum expected_args type, int val); 47 enum expected_args type, int val);
48 48
49struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, 49const struct cmd_handler *find_handler(char *line,
50 size_t handlers_size); 50 const struct cmd_handler *cmd_handlers, size_t handlers_size);
51 51
52/** 52/**
53 * Parse and executes a command. 53 * Parse and executes a command.
@@ -68,7 +68,7 @@ struct cmd_results *config_command(char *command, char **new_block);
68 * Parse and handle a sub command 68 * Parse and handle a sub command
69 */ 69 */
70struct cmd_results *config_subcommand(char **argv, int argc, 70struct cmd_results *config_subcommand(char **argv, int argc,
71 struct cmd_handler *handlers, size_t handlers_size); 71 const struct cmd_handler *handlers, size_t handlers_size);
72/* 72/*
73 * Parses a command policy rule. 73 * Parses a command policy rule.
74 */ 74 */