-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
gh-117845: Detect libedit hook function signature in configure #117870
Conversation
Older libedit versions (like Apple's) use a different type signature for rl_startup_hook and rl_pre_input_hook. Add a configure check to determine which one is accepted.
The approach seems fine to me, but it seems to me you need to properly regenerate |
I'm not sure we need a NEWS entry for this; OTOH, it does not hurt to have one either. Can you add a short description regarding the user visible effects of this change, @jmroot? Something like this should suffice: "Fix building against recent libedit by detecting readline hook function signatures in configure". |
Oh thanks, I had just noticed I forgot to add pyconfig.h.in. |
Misc/NEWS.d/next/Build/2024-04-15-08-35-06.gh-issue-117845.IowzyW.rst
Outdated
Show resolved
Hide resolved
cc. @sobolevn, who was involved in the related issues on the tracker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
I'll wait for @corona10's thumbs up before merging. |
I will take a look at it by tomorrow. Sorry, my time bandwidth is limited these days. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, nice approach!
|
|
|
|
|
…ython#117870) Older libedit versions (like Apple's) use a different type signature for rl_startup_hook and rl_pre_input_hook. Add a configure check to determine which signature is accepted by introducing the Py_RL_STARTUP_HOOK_TAKES_ARGS macro in pyconfig.h.
Older libedit versions (like Apple's) use a different type signature for
rl_startup_hook
andrl_pre_input_hook
. Add a configure check to determine which one is accepted.