Skip to content

Commit 67e3a54

Browse files
committed
Address code review
1 parent b89dd4c commit 67e3a54

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Modules/readline.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ static int
10201020
#if defined(_RL_FUNCTION_TYPEDEF)
10211021
on_startup_hook(void)
10221022
{
1023-
#elif defined(__APPLE__) && defined(WITH_EDITLINE)
1023+
#elif defined(__APPLE__) && defined(WITH_APPLE_READLINE)
10241024
on_startup_hook(const char *text, int state)
10251025
{
10261026
(void)text;
@@ -1041,7 +1041,7 @@ static int
10411041
#if defined(_RL_FUNCTION_TYPEDEF)
10421042
on_pre_input_hook(void)
10431043
{
1044-
#elif defined(__APPLE__) && defined(WITH_EDITLINE)
1044+
#elif defined(__APPLE__) && defined(WITH_APPLE_READLINE)
10451045
on_pre_input_hook(const char *text, int state)
10461046
{
10471047
(void)text;

configure

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5813,6 +5813,7 @@ dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline
58135813
dnl or readline.pc provide correct linker information.
58145814

58155815
AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.])
5816+
AH_TEMPLATE([WITH_APPLE_READLINE], [Define to build the readline module agains apple builtin readline.])
58165817

58175818
AC_ARG_WITH(
58185819
[readline],
@@ -5832,7 +5833,7 @@ AC_ARG_WITH(
58325833
dnl gh-105323: Need to handle the macOS editline as an alias of readline.
58335834
AS_VAR_IF([with_readline], [default], [
58345835
AS_CASE([$ac_sys_system/$ac_sys_release],
5835-
[Darwin/*], [AC_DEFINE([WITH_EDITLINE], [1]) with_readline=readline],
5836+
[Darwin/*], [AC_DEFINE([WITH_APPLE_READLINE], [1]) with_readline=readline],
58365837
[with_readline=readline])
58375838
])
58385839

pyconfig.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,6 +1791,9 @@
17911791
/* Define if WINDOW in curses.h offers a field _flags. */
17921792
#undef WINDOW_HAS_FLAGS
17931793

1794+
/* Define to build the readline module agains apple builtin readline. */
1795+
#undef WITH_APPLE_READLINE
1796+
17941797
/* Define if you want build the _decimal module using a coroutine-local rather
17951798
than a thread-local context */
17961799
#undef WITH_DECIMAL_CONTEXTVAR

0 commit comments

Comments
 (0)