X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=scripts%2Fgen_curlinfo.php;h=92ff65e42859bb64b732498eff4158e76e65a0c3;hp=bc4a683b05f63a2010fabc31500a97a999343221;hb=640b762aa5a5fdf571e44f7a66725c097b7dc0f1;hpb=52be96243430aa591233fdc021f838ec7abaf308 diff --git a/scripts/gen_curlinfo.php b/scripts/gen_curlinfo.php index bc4a683..92ff65e 100755 --- a/scripts/gen_curlinfo.php +++ b/scripts/gen_curlinfo.php @@ -39,6 +39,7 @@ $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)', + '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)', ); @@ -81,6 +82,12 @@ $templates = array( 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); @@ -95,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; - 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");