Skip to content

Commit 65c3afc

Browse files
benjaminpjcfr
authored andcommitted
Backport "new plan: just remove typecasts (closes python#20374)"
See python/cpython@0ac0ead
1 parent 245b1d7 commit 65c3afc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Modules/readline.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ on_completion(const char *text, int state)
850850
* before calling the normal completer */
851851

852852
static char **
853-
flex_complete(char *text, int start, int end)
853+
flex_complete(const char *text, int start, int end)
854854
{
855855
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
856856
rl_completion_append_character ='\0';
@@ -898,12 +898,12 @@ setup_readline(void)
898898
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
899899
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
900900
/* Set our hook functions */
901-
rl_startup_hook = (rl_hook_func_t *)on_startup_hook;
901+
rl_startup_hook = on_startup_hook;
902902
#ifdef HAVE_RL_PRE_INPUT_HOOK
903-
rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook;
903+
rl_pre_input_hook = on_pre_input_hook;
904904
#endif
905905
/* Set our completion function */
906-
rl_attempted_completion_function = (rl_completion_func_t *)flex_complete;
906+
rl_attempted_completion_function = flex_complete;
907907
/* Set Python word break characters */
908908
completer_word_break_characters =
909909
rl_completer_word_break_characters =

0 commit comments

Comments
 (0)