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

Commit f4cb0d2

Browse filesBrowse files
authored
gh-109191: Fix build with newer editline (gh-110239)
1 parent 12cc679 commit f4cb0d2
Copy full SHA for f4cb0d2

File tree

5 files changed

+31
-1
lines changed
Filter options

5 files changed

+31
-1
lines changed
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix compile error when building with recent versions of libedit.

‎Modules/readline.c

Copy file name to clipboardExpand all lines: Modules/readline.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ readline_set_completion_display_matches_hook_impl(PyObject *module,
446446
default completion display. */
447447
rl_completion_display_matches_hook =
448448
readlinestate_global->completion_display_matches_hook ?
449-
#if defined(_RL_FUNCTION_TYPEDEF)
449+
#if defined(HAVE_RL_COMPDISP_FUNC_T)
450450
(rl_compdisp_func_t *)on_completion_display_matches_hook : 0;
451451
#else
452452
(VFunction *)on_completion_display_matches_hook : 0;

‎configure

Copy file name to clipboardExpand all lines: configure
+19Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎configure.ac

Copy file name to clipboardExpand all lines: configure.ac
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5999,6 +5999,13 @@ AS_VAR_IF([with_readline], [no], [
59995999
AC_DEFINE([HAVE_RL_APPEND_HISTORY], [1], [Define if readline supports append_history])
60006000
])
60016001
6002+
# in readline as well as newer editline (April 2023)
6003+
AC_CHECK_TYPE([rl_compdisp_func_t],
6004+
[AC_DEFINE([HAVE_RL_COMPDISP_FUNC_T], [1],
6005+
[Define if readline supports rl_compdisp_func_t])],
6006+
[],
6007+
[readline_includes])
6008+
60026009
m4_undefine([readline_includes])
60036010
])dnl WITH_SAVE_ENV()
60046011
])

‎pyconfig.h.in

Copy file name to clipboardExpand all lines: pyconfig.h.in
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,9 @@
983983
/* Define if you can turn off readline's signal handling. */
984984
#undef HAVE_RL_CATCH_SIGNAL
985985

986+
/* Define if readline supports rl_compdisp_func_t */
987+
#undef HAVE_RL_COMPDISP_FUNC_T
988+
986989
/* Define if you have readline 2.2 */
987990
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
988991

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.