Skip to content

Commit 99aecf3

Browse files
committed
ext/curl: Update libcurl version comparison preprocessors to contain human readable version names
1 parent 017ea5e commit 99aecf3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ext/curl/curl_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef struct {
7575
php_curl_callback *progress;
7676
php_curl_callback *xferinfo;
7777
php_curl_callback *fnmatch;
78-
#if LIBCURL_VERSION_NUM >= 0x075400
78+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
7979
php_curl_callback *sshhostkey;
8080
#endif
8181
} php_curl_handlers;

ext/curl/interface.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ PHP_MINFO_FUNCTION(curl)
296296
#if LIBCURL_VERSION_NUM >= 0x074001 /* 7.64.1 */
297297
{"ALTSVC", CURL_VERSION_ALTSVC},
298298
#endif
299-
#if LIBCURL_VERSION_NUM >= 0x074200 /* 7.66.0 */
299+
#if LIBCURL_VERSION_NUM >= 0x074200 /* Available since 7.66.0 */
300300
{"HTTP3", CURL_VERSION_HTTP3},
301301
#endif
302-
#if LIBCURL_VERSION_NUM >= 0x074800 /* 7.72.0 */
302+
#if LIBCURL_VERSION_NUM >= 0x074800 /* Available since 7.72.0 */
303303
{"UNICODE", CURL_VERSION_UNICODE},
304304
{"ZSTD", CURL_VERSION_ZSTD},
305305
#endif
@@ -499,7 +499,7 @@ static HashTable *curl_get_gc(zend_object *object, zval **table, int *n)
499499
zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers.fnmatch->func_name);
500500
}
501501

502-
#if LIBCURL_VERSION_NUM >= 0x075400
502+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
503503
if (curl->handlers.sshhostkey) {
504504
zend_get_gc_buffer_add_zval(gc_buffer, &curl->handlers.sshhostkey->func_name);
505505
}
@@ -756,7 +756,7 @@ static size_t curl_xferinfo(void *clientp, curl_off_t dltotal, curl_off_t dlnow,
756756
}
757757
/* }}} */
758758

759-
#if LIBCURL_VERSION_NUM >= 0x075400
759+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
760760
static int curl_ssh_hostkeyfunction(void *clientp, int keytype, const char *key, size_t keylen)
761761
{
762762
php_curl *ch = (php_curl *)clientp;
@@ -1057,7 +1057,7 @@ void init_curl_handle(php_curl *ch)
10571057
ch->handlers.progress = NULL;
10581058
ch->handlers.xferinfo = NULL;
10591059
ch->handlers.fnmatch = NULL;
1060-
#if LIBCURL_VERSION_NUM >= 0x075400
1060+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
10611061
ch->handlers.sshhostkey = NULL;
10621062
#endif
10631063
ch->clone = emalloc(sizeof(uint32_t));
@@ -1233,7 +1233,7 @@ void _php_setup_easy_copy_handlers(php_curl *ch, php_curl *source)
12331233
_php_copy_callback(ch, &ch->handlers.progress, source->handlers.progress, CURLOPT_PROGRESSDATA);
12341234
_php_copy_callback(ch, &ch->handlers.xferinfo, source->handlers.xferinfo, CURLOPT_XFERINFODATA);
12351235
_php_copy_callback(ch, &ch->handlers.fnmatch, source->handlers.fnmatch, CURLOPT_FNMATCH_DATA);
1236-
#if LIBCURL_VERSION_NUM >= 0x075400
1236+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
12371237
_php_copy_callback(ch, &ch->handlers.sshhostkey, source->handlers.sshhostkey, CURLOPT_SSH_HOSTKEYDATA);
12381238
#endif
12391239

@@ -2787,7 +2787,7 @@ static void curl_free_obj(zend_object *object)
27872787
_php_curl_free_callback(ch->handlers.progress);
27882788
_php_curl_free_callback(ch->handlers.xferinfo);
27892789
_php_curl_free_callback(ch->handlers.fnmatch);
2790-
#if LIBCURL_VERSION_NUM >= 0x075400
2790+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
27912791
_php_curl_free_callback(ch->handlers.sshhostkey);
27922792
#endif
27932793

@@ -2870,7 +2870,7 @@ static void _php_curl_reset_handlers(php_curl *ch)
28702870
ch->handlers.fnmatch = NULL;
28712871
}
28722872

2873-
#if LIBCURL_VERSION_NUM >= 0x075400
2873+
#if LIBCURL_VERSION_NUM >= 0x075400 /* Available since 7.84.0 */
28742874
if (ch->handlers.sshhostkey) {
28752875
zval_ptr_dtor(&ch->handlers.sshhostkey->func_name);
28762876
efree(ch->handlers.sshhostkey);

0 commit comments

Comments
 (0)