-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-105323: Add special workround for macOS default editline #108633
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
Changes from 3 commits
aaf7bf0
19fbfa8
da9156f
b89dd4c
67e3a54
2e2377f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1019,10 +1019,16 @@ on_hook(PyObject *func) | |
| static int | ||
| #if defined(_RL_FUNCTION_TYPEDEF) | ||
| on_startup_hook(void) | ||
| { | ||
| #elif defined(__APPLE__) && defined(WITH_EDITLINE) | ||
|
||
| on_startup_hook(const char *text, int state) | ||
| { | ||
| (void)text; | ||
| (void)state; | ||
| #else | ||
| on_startup_hook(void) | ||
| #endif | ||
| { | ||
| #endif | ||
| int r; | ||
| PyGILState_STATE gilstate = PyGILState_Ensure(); | ||
| r = on_hook(readlinestate_global->startup_hook); | ||
|
|
@@ -1034,10 +1040,16 @@ on_startup_hook(void) | |
| static int | ||
| #if defined(_RL_FUNCTION_TYPEDEF) | ||
| on_pre_input_hook(void) | ||
| { | ||
| #elif defined(__APPLE__) && defined(WITH_EDITLINE) | ||
| on_pre_input_hook(const char *text, int state) | ||
| { | ||
| (void)text; | ||
| (void)state; | ||
| #else | ||
| on_pre_input_hook(void) | ||
| #endif | ||
| { | ||
| #endif | ||
| int r; | ||
| PyGILState_STATE gilstate = PyGILState_Ensure(); | ||
| r = on_hook(readlinestate_global->pre_input_hook); | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5822,13 +5822,19 @@ AC_ARG_WITH( | |
| AS_CASE([$with_readline], | ||
| [editline|edit], [with_readline=edit], | ||
| [yes|readline], [with_readline=readline], | ||
| [no], [], | ||
| [no], [with_readline=default], | ||
|
||
| [AC_MSG_ERROR([proper usage is --with(out)-readline@<:@=editline|readline|no@:>@])] | ||
| ) | ||
| ], | ||
| [with_readline=readline] | ||
| [with_readline=default] | ||
| ) | ||
|
|
||
| AS_VAR_IF([with_readline], [default], [ | ||
| AS_CASE([$ac_sys_system/$ac_sys_release], | ||
| [Darwin/*], [AC_DEFINE([WITH_EDITLINE], [1]) with_readline=readline], | ||
| [with_readline=readline]) | ||
| ]) | ||
|
|
||
| AS_VAR_IF([with_readline], [readline], [ | ||
| PKG_CHECK_MODULES([LIBREADLINE], [readline], [ | ||
| LIBREADLINE=readline | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.