diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-02-02 19:54:35 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-02-02 19:54:35 -0500 |
| commit | d7529d1db47a4a90c9001358a31468b1f9e9752f (patch) | |
| tree | b4576f3715e53300794f92e4c6339df0ac1e447a /include | |
| parent | 25f41711549e43ae477e3d6a8a3979db24a0cca5 (diff) | |
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.h | 6 |
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 { struct cmd_results *checkarg(int argc, const char *name, enum expected_args type, int val); -struct cmd_handler *find_handler(char *line, struct cmd_handler *cmd_handlers, - size_t handlers_size); +const struct cmd_handler *find_handler(char *line, + const struct cmd_handler *cmd_handlers, size_t handlers_size); /** * Parse and executes a command. @@ -68,7 +68,7 @@ struct cmd_results *config_command(char *command, char **new_block); * Parse and handle a sub command */ struct cmd_results *config_subcommand(char **argv, int argc, - struct cmd_handler *handlers, size_t handlers_size); + const struct cmd_handler *handlers, size_t handlers_size); /* * Parses a command policy rule. */ |
