-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Incompatible function pointer types assigning to 'Function *' at readline module #105323
Comments
Header from apple Xcode. /* typedefs */
typedef int Function(const char *, int);
typedef void VFunction(void);
typedef void VCPFunction(char *);
typedef char *CPFunction(const char *, int);
typedef char **CPPFunction(const char *, int, int);
typedef char *rl_compentry_func_t(const char *, int);
typedef int rl_command_func_t(int, int); |
@corona10, did you get any further with this? I'm getting annoyed at these warnings, myself :) |
@erlend-aasland I will try to solve this issue at this weekend ;) |
Hi Ned, But if we have to care about linking with the GNU version on the macOS, the problem will be more difficult. |
You can use the preprocessor define |
Wow, That's good! I will prepare the patch by this weekend :) |
If you grep for |
See discussion on #108588 |
For reference what I investigated
|
Ok, it looks like the libedit I linked to would be unusable with CPython, so we can disregard that. |
BTW, we have some really outdated readline checks in configure.ac. Any check for functionality introduced in readline versions before 4.2 could probably be tossed out. |
I think this issue impacts more than MacOS. I tried to link libedit on Ubuntu and it has the same issue.
We only use two headers, I was wondering if we need I think we should do something like static int
#if defined(_RL_FUNCTION_TYPEDEF)
on_startup_hook(void)
#else
on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state))
#endif |
Okay if this issue is happening outside of macOS too. We can use your suggestion for this issue. |
@gaogaotiantian Do you want to submit the patch? |
Yeah I'll do it. As |
Just remove WITH_APPLE_EDITLINE please |
Two things are needed.
|
Done in #112513 |
Can this be closed, @corona10? |
Yeah sure! |
…tion for all editline (pythongh-112513)
…tion for all editline (pythongh-112513)
At macOS 12.5.1 with Apple clang version 14.0.0 (clang-1400.0.29.202)
Linked PRs
WITH_APPLE_EDITLINE
to use the same declaration for all editline #112513The text was updated successfully, but these errors were encountered: