Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.11] gh-109191: Fix build with newer editline (gh-110239). #110575

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
[3.11] gh-109191: Fix build with newer editline (gh-110239).
(cherry picked from commit f4cb0d2)

Co-authored-by: Bo Anderson <mail@boanderson.me>
  • Loading branch information
Bo98 committed Oct 9, 2023
commit 31b6aa76491e85b569119d0778809afe18c3384e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix compile error when building with recent versions of libedit.
2 changes: 1 addition & 1 deletion 2 Modules/readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,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
17 changes: 17 additions & 0 deletions 17 configure

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

14 changes: 14 additions & 0 deletions 14 configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -5918,6 +5918,20 @@ if test "$py_cv_lib_readline" = yes; then
AC_CHECK_LIB($LIBREADLINE, append_history,
AC_DEFINE(HAVE_RL_APPEND_HISTORY, 1,
[Define if readline supports append_history]),,$READLINE_LIBS)

# 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])],
[],
[
#include <stdio.h> /* Must be first for Gnu Readline */
#ifdef WITH_EDITLINE
# include <editline/readline.h>
#else
# include <readline/readline.h>
#endif
])
fi

# End of readline checks: restore LIBS
Expand Down
3 changes: 3 additions & 0 deletions 3 pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.