mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:13:35 +03:00
nghttp2: use custom memory functions
Provide libcurl's memory functions as callbacks to replace nghttp2's own memory functions. This allows custom memory callbacks provided by users of libcurl to be used by nghttp2 as well. Closes #15527
This commit is contained in:
parent
1cd745a581
commit
9089ef1f4f
3 changed files with 35 additions and 2 deletions
|
|
@ -60,6 +60,11 @@ CURLcode Curl_http2_upgrade(struct Curl_easy *data,
|
|||
struct connectdata *conn, int sockindex,
|
||||
const char *ptr, size_t nread);
|
||||
|
||||
void *Curl_nghttp2_malloc(size_t size, void *user_data);
|
||||
void Curl_nghttp2_free(void *ptr, void *user_data);
|
||||
void *Curl_nghttp2_calloc(size_t nmemb, size_t size, void *user_data);
|
||||
void *Curl_nghttp2_realloc(void *ptr, size_t size, void *user_data);
|
||||
|
||||
extern struct Curl_cftype Curl_cft_nghttp2;
|
||||
|
||||
#else /* USE_NGHTTP2 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue