]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-105323: Remove `WITH_APPLE_EDITLINE` to use the same declaration for all editline...
authorTian Gao <gaogaotiantian@hotmail.com>
Tue, 5 Dec 2023 14:52:28 +0000 (05:52 -0900)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 14:52:28 +0000 (23:52 +0900)
Modules/readline.c
configure
configure.ac
pyconfig.h.in

index afbb7f8f0ec18f62b9e2d8c6eae37e23e4ca4c49..e29051c37f882717de41eb420e34e30c225290b8 100644 (file)
@@ -1043,10 +1043,8 @@ on_hook(PyObject *func)
 static int
 #if defined(_RL_FUNCTION_TYPEDEF)
 on_startup_hook(void)
-#elif defined(WITH_APPLE_EDITLINE)
-on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
 #else
-on_startup_hook(void)
+on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
 #endif
 {
     int r;
@@ -1065,10 +1063,8 @@ on_startup_hook(void)
 static int
 #if defined(_RL_FUNCTION_TYPEDEF)
 on_pre_input_hook(void)
-#elif defined(WITH_APPLE_EDITLINE)
-on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
 #else
-on_pre_input_hook(void)
+on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
 #endif
 {
     int r;
index 319009537f461c432b677fc6075f3d1f5536e4e7..8894122a11e86e4c95ff8d1241d9eab7dacac6ae 100755 (executable)
--- a/configure
+++ b/configure
@@ -23971,7 +23971,6 @@ fi
 
 
 
-
 # Check whether --with-readline was given.
 if test ${with_readline+y}
 then :
@@ -23994,22 +23993,6 @@ else $as_nop
 fi
 
 
-# gh-105323: Need to handle the macOS editline as an alias of readline.
-case $ac_sys_system/$ac_sys_release in #(
-  Darwin/*) :
-    ac_fn_c_check_type "$LINENO" "Function" "ac_cv_type_Function" "#include <readline/readline.h>
-"
-if test "x$ac_cv_type_Function" = xyes
-then :
-  printf "%s\n" "#define WITH_APPLE_EDITLINE 1" >>confdefs.h
-
-fi
- ;; #(
-  *) :
-
- ;;
-esac
-
 if test "x$with_readline" = xreadline
 then :
 
index b78472e04846b784908e35462163839aa77eaf12..1512e6d9e8c42adf65978bcfec01f84cf28d3720 100644 (file)
@@ -5914,7 +5914,6 @@ dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline
 dnl or readline.pc provide correct linker information.
 
 AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.])
-AH_TEMPLATE([WITH_APPLE_EDITLINE], [Define to build the readline module against Apple BSD editline.])
 
 AC_ARG_WITH(
   [readline],
@@ -5931,15 +5930,6 @@ AC_ARG_WITH(
   [with_readline=readline]
 )
 
-# gh-105323: Need to handle the macOS editline as an alias of readline.
-AS_CASE([$ac_sys_system/$ac_sys_release],
-  [Darwin/*], [AC_CHECK_TYPE([Function],
-                             [AC_DEFINE([WITH_APPLE_EDITLINE])],
-                             [],
-                             [@%:@include <readline/readline.h>])],
-  []
-)
-
 AS_VAR_IF([with_readline], [readline], [
   PKG_CHECK_MODULES([LIBREADLINE], [readline], [
     LIBREADLINE=readline
index bf708926e22c435a279f3b4c4387b300832547e6..2978fa2c17301f0ef16c5d8542d398693f27e7a6 100644 (file)
 /* Define if WINDOW in curses.h offers a field _flags. */
 #undef WINDOW_HAS_FLAGS
 
-/* Define to build the readline module against Apple BSD editline. */
-#undef WITH_APPLE_EDITLINE
-
 /* Define if you want build the _decimal module using a coroutine-local rather
    than a thread-local context */
 #undef WITH_DECIMAL_CONTEXTVAR