mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +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
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include <curl/curl.h>
|
||||
|
||||
struct Curl_easy;
|
||||
|
||||
#include "urldata.h"
|
||||
#include "warnless.h"
|
||||
#include "escape.h"
|
||||
|
|
@ -53,7 +55,7 @@ char *curl_unescape(const char *string, int length)
|
|||
/* Escapes for URL the given unescaped string of given length.
|
||||
* 'data' is ignored since 7.82.0.
|
||||
*/
|
||||
char *curl_easy_escape(struct Curl_easy *data, const char *string,
|
||||
char *curl_easy_escape(CURL *data, const char *string,
|
||||
int inlength)
|
||||
{
|
||||
size_t length;
|
||||
|
|
@ -176,7 +178,7 @@ CURLcode Curl_urldecode(const char *string, size_t length,
|
|||
* If olen == NULL, no output length is stored.
|
||||
* 'data' is ignored since 7.82.0.
|
||||
*/
|
||||
char *curl_easy_unescape(struct Curl_easy *data, const char *string,
|
||||
char *curl_easy_unescape(CURL *data, const char *string,
|
||||
int length, int *olen)
|
||||
{
|
||||
char *str = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue