mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:23:34 +03:00
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:
parent
ad1c49bc0e
commit
eed3c8f4b7
15 changed files with 98 additions and 74 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue