curl.h: remove the struct pointer for CURL/CURLSH/CURLM typedefs

It makes the callbacks get different signnatures when used from within
libcurl vs outside of it by libcurl-using applications (such as the
libtests) and this triggers UndefinedBehaviorSanitizer errors.

Closes #15289
This commit is contained in:
Daniel Stenberg 2024-10-14 14:09:59 +02:00
parent ad1c49bc0e
commit eed3c8f4b7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 98 additions and 74 deletions

View file

@ -30,7 +30,7 @@
*/
#ifdef CURL_NO_OLDIES
#define CURL_STRICTER
#define CURL_STRICTER /* not used since 8.11.0 */
#endif
/* Compile-time deprecation macros. */
@ -114,13 +114,8 @@
extern "C" {
#endif
#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
typedef struct Curl_easy CURL;
typedef struct Curl_share CURLSH;
#else
typedef void CURL;
typedef void CURLSH;
#endif
/*
* libcurl external API function linkage decorations.

View file

@ -54,11 +54,7 @@
extern "C" {
#endif
#if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER)
typedef struct Curl_multi CURLM;
#else
typedef void CURLM;
#endif
typedef enum {
CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or