Skip to content

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jun 30, 2023

@corona10
Copy link
Member Author

corona10 commented Jun 30, 2023

Type definitions from the macOS readline.h

/* 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 corona10 changed the title gh-105323: Suppress function pointer warning by type casting [WIP] gh-105323: Suppress function pointer warning by type casting Jun 30, 2023
@corona10 corona10 closed this Jun 30, 2023
@corona10 corona10 removed the request for review from ned-deily June 30, 2023 15:38
@corona10
Copy link
Member Author

corona10 commented Jun 30, 2023

I will discover a better approach than this PR..

@erlend-aasland
Copy link
Contributor

Type definitions from the macOS readline.h

Confirming this on my box:

$ locate readline.h | xargs grep -n "typedef.*\<Function"
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/editline/readline.h:40:typedef int	  Function(const char *, int);
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:40:typedef int	  Function(const char *, int);
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/editline/readline.h:40:typedef int	  Function(const char *, int);
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/readline/readline.h:40:typedef int	  Function(const char *, int);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/editline/readline.h:40:typedef int	  Function(const char *, int);
/Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/usr/include/readline/readline.h:40:typedef int	  Function(const char *, int);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants