Skip to content

Commit a73eb8e

Browse files
gaogaotiantianGlyphack
authored andcommitted
pythongh-105323: Remove WITH_APPLE_EDITLINE to use the same declaration for all editline (pythongh-112513)
1 parent 5df7515 commit a73eb8e

File tree

4 files changed

+2
-36
lines changed

4 files changed

+2
-36
lines changed

Modules/readline.c

+2-6
Original file line numberDiff line numberDiff line change
@@ -1043,10 +1043,8 @@ on_hook(PyObject *func)
10431043
static int
10441044
#if defined(_RL_FUNCTION_TYPEDEF)
10451045
on_startup_hook(void)
1046-
#elif defined(WITH_APPLE_EDITLINE)
1047-
on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
10481046
#else
1049-
on_startup_hook(void)
1047+
on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
10501048
#endif
10511049
{
10521050
int r;
@@ -1065,10 +1063,8 @@ on_startup_hook(void)
10651063
static int
10661064
#if defined(_RL_FUNCTION_TYPEDEF)
10671065
on_pre_input_hook(void)
1068-
#elif defined(WITH_APPLE_EDITLINE)
1069-
on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
10701066
#else
1071-
on_pre_input_hook(void)
1067+
on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
10721068
#endif
10731069
{
10741070
int r;

configure

-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

-10
Original file line numberDiff line numberDiff line change
@@ -5914,7 +5914,6 @@ dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline
59145914
dnl or readline.pc provide correct linker information.
59155915

59165916
AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.])
5917-
AH_TEMPLATE([WITH_APPLE_EDITLINE], [Define to build the readline module against Apple BSD editline.])
59185917

59195918
AC_ARG_WITH(
59205919
[readline],
@@ -5931,15 +5930,6 @@ AC_ARG_WITH(
59315930
[with_readline=readline]
59325931
)
59335932

5934-
# gh-105323: Need to handle the macOS editline as an alias of readline.
5935-
AS_CASE([$ac_sys_system/$ac_sys_release],
5936-
[Darwin/*], [AC_CHECK_TYPE([Function],
5937-
[AC_DEFINE([WITH_APPLE_EDITLINE])],
5938-
[],
5939-
[@%:@include <readline/readline.h>])],
5940-
[]
5941-
)
5942-
59435933
AS_VAR_IF([with_readline], [readline], [
59445934
PKG_CHECK_MODULES([LIBREADLINE], [readline], [
59455935
LIBREADLINE=readline

pyconfig.h.in

-3
Original file line numberDiff line numberDiff line change
@@ -1800,9 +1800,6 @@
18001800
/* Define if WINDOW in curses.h offers a field _flags. */
18011801
#undef WINDOW_HAS_FLAGS
18021802

1803-
/* Define to build the readline module against Apple BSD editline. */
1804-
#undef WITH_APPLE_EDITLINE
1805-
18061803
/* Define if you want build the _decimal module using a coroutine-local rather
18071804
than a thread-local context */
18081805
#undef WITH_DECIMAL_CONTEXTVAR

0 commit comments

Comments
 (0)