Constify pointer return value of find_command()
This commit is contained in:
@@ -258,7 +258,7 @@ extern void ame (char *, char *, char *, char *);
|
||||
extern void unload_dll (char *, char *, char *, char *);
|
||||
#endif
|
||||
|
||||
IrcCommand *BX_find_command (const char *, int *);
|
||||
const IrcCommand *BX_find_command (const char *, int *);
|
||||
|
||||
#define AWAY_ONE 0
|
||||
#define AWAY_ALL 1
|
||||
|
||||
@@ -627,7 +627,7 @@ extern Function_ptr *global;
|
||||
#define io (*(void (*)(const char *))global[IRC_IO_FUNC])
|
||||
|
||||
/* commands.c */
|
||||
#define find_command (*(IrcCommand *(*)(const char *, int *))global[FIND_COMMAND_FUNC])
|
||||
#define find_command (*(const IrcCommand *(*)(const char *, int *))global[FIND_COMMAND_FUNC])
|
||||
|
||||
#define lock_stack_frame (*(void (*)(void ))global[LOCK_STACK_FRAME])
|
||||
#define unlock_stack_frame (*(void (*)(void ))global[UNLOCK_STACK_FRAME])
|
||||
|
||||
@@ -2242,7 +2242,7 @@ char *lookup_member(char *varname, char *var_args, char *ptr, char *args)
|
||||
*/
|
||||
static char *glob_commands(const char *prefix, int *cnt)
|
||||
{
|
||||
IrcCommand *var;
|
||||
const IrcCommand *var;
|
||||
char *mylist = NULL;
|
||||
const size_t prefix_len = strlen(prefix);
|
||||
|
||||
|
||||
@@ -913,7 +913,7 @@ BUILT_IN_COMMAND(init_ftp)
|
||||
* returned and cnt is set to the number of matches * -1. Thus is 4 commands
|
||||
* matched, but the first was as exact match, cnt is -4.
|
||||
*/
|
||||
IrcCommand *BX_find_command(const char *com, int *cnt)
|
||||
const IrcCommand *BX_find_command(const char *com, int *cnt)
|
||||
{
|
||||
IrcCommand *retval;
|
||||
int loc;
|
||||
@@ -4114,7 +4114,7 @@ void command_completion(char unused, char *not_used)
|
||||
*cmdchars,
|
||||
*rest,
|
||||
firstcmdchar[2] = "/";
|
||||
IrcCommand *command;
|
||||
const IrcCommand *command;
|
||||
#ifdef WANT_DLL
|
||||
IrcCommandDll *dll = NULL;
|
||||
#endif
|
||||
@@ -4542,7 +4542,7 @@ static unsigned int level = 0;
|
||||
*alias = NULL,
|
||||
*alias_name = NULL,
|
||||
*cline = NULL;
|
||||
IrcCommand *command = NULL;
|
||||
const IrcCommand *command = NULL;
|
||||
void *arglist = NULL;
|
||||
int cmd_cnt,
|
||||
alias_cnt = 0;
|
||||
@@ -5569,7 +5569,7 @@ BUILT_IN_COMMAND(returncmd)
|
||||
|
||||
BUILT_IN_COMMAND(help)
|
||||
{
|
||||
IrcCommand *cmd = NULL;
|
||||
const IrcCommand *cmd = NULL;
|
||||
#ifdef WANT_DLL
|
||||
IrcCommandDll *cmddll = NULL;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user