Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ readline_set_completion_display_matches_hook_impl(PyObject *module,
default completion display. */
rl_completion_display_matches_hook =
readlinestate_global->completion_display_matches_hook ?
#if defined(_RL_FUNCTION_TYPEDEF)
#if defined(HAVE_RL_COMPDISP_FUNC_T)
(rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
#else
(VFunction *)on_completion_display_matches_hook : 0;
Expand Down
21 changes: 21 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5992,6 +5992,11 @@ AS_VAR_IF([with_readline], [no], [
AC_DEFINE([HAVE_RL_APPEND_HISTORY], [1], [Define if readline supports append_history])
])

# in readline as well as newer editline (April 2023)
AC_CHECK_TYPE([rl_compdisp_func_t], [
AC_DEFINE([HAVE_RL_COMPDISP_FUNC_T], [1], [Define if readline supports rl_compdisp_func_t])
], [], [readline_includes])
Comment thread
Bo98 marked this conversation as resolved.
Outdated

m4_undefine([readline_includes])
])dnl WITH_SAVE_ENV()
])
Expand Down
3 changes: 3 additions & 0 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,9 @@
/* Define if you can turn off readline's signal handling. */
#undef HAVE_RL_CATCH_SIGNAL

/* Define if readline supports rl_compdisp_func_t */
#undef HAVE_RL_COMPDISP_FUNC_T

/* Define if you have readline 2.2 */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER

Expand Down