projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
PHP-8.1 compat
[m6w6/ext-http]
/
scripts
/
gen_curlinfo.php
diff --git
a/scripts/gen_curlinfo.php
b/scripts/gen_curlinfo.php
index 0aa9c5eca5e505f50b7779fdede9ab0292f57cbb..92ff65e42859bb64b732498eff4158e76e65a0c3 100755
(executable)
--- a/
scripts/gen_curlinfo.php
+++ b/
scripts/gen_curlinfo.php
@@
-39,6
+39,9
@@
$ifdefs = array(
'PROXY_SSL_VERIFYRESULT' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
'PROTOCOL' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
'SCHEME' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
'PROXY_SSL_VERIFYRESULT' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
'PROTOCOL' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
'SCHEME' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
+ 'RETRY_AFTER' => 'PHP_HTTP_CURL_VERSION(7,66,0)',
+ 'EFFECTIVE_METHOD' => 'PHP_HTTP_CURL_VERSION(7,72,0)',
+ 'PROXY_ERROR' => 'PHP_HTTP_CURL_VERSION(7,73,0)',
);
$exclude = array(
'ACTIVESOCKET',
);
$exclude = array(
'ACTIVESOCKET',
@@
-79,6
+82,12
@@
$templates = array(
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
+'OFF_T' =>
+' if (CURLE_OK == curl_easy_getinfo(ch, %s, &o)) {
+ ZVAL_LONG(&tmp, o);
+ zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
+ }
+',
'SLIST' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &s)) {
array_init(&tmp);
'SLIST' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &s)) {
array_init(&tmp);
@@
-93,12
+102,12
@@
$templates = array(
',
);
',
);
-$infos = file_re('curl.h', '/^\s*(CURLINFO_(\w+))\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST)\s*\+\s*\d+\s*,?\s*$/m');
+$infos = file_re('curl.h', '/^\s*(CURLINFO_(\w+))\s*=\s*CURLINFO_(STRING|LONG|DOUBLE|SLIST
|OFF_T
)\s*\+\s*\d+\s*,?\s*$/m');
ob_start();
foreach ($infos as $info) {
list(, $full, $short, $type) = $info;
ob_start();
foreach ($infos as $info) {
list(, $full, $short, $type) = $info;
- if (in_array($short, $exclude)) continue;
+ if (in_array($short, $exclude)
|| substr($short, -2) === "_T"
) continue;
if (isset($ifdefs[$short])) printf("#if %s\n", $ifdefs[$short]);
printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short));
if (isset($ifdefs[$short])) printf("#endif\n");
if (isset($ifdefs[$short])) printf("#if %s\n", $ifdefs[$short]);
printf($templates[$type], $full, strtolower((isset($translate[$short])) ? $translate[$short] : $short));
if (isset($ifdefs[$short])) printf("#endif\n");