projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
simplify
[m6w6/ext-http]
/
gen_curlinfo.php
diff --git
a/gen_curlinfo.php
b/gen_curlinfo.php
old mode 100644
(file)
new mode 100755
(executable)
index
fea14bb
..
66fd87b
--- a/
gen_curlinfo.php
+++ b/
gen_curlinfo.php
@@
-1,6
+1,5
@@
#!/usr/bin/env php
<?php
#!/usr/bin/env php
<?php
-// $Id: gen_curlinfo.php 323304 2012-02-17 21:13:24Z mike $
error_reporting(0);
error_reporting(0);
@@
-40,7
+39,7
@@
$ifdefs = array(
'LOCAL_IP' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
);
$exclude = array(
'LOCAL_IP' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
);
$exclude = array(
- 'PRIVATE', 'LASTSOCKET', 'FTP_ENTRY_PATH', 'CERTINFO',
+ 'PRIVATE', 'LASTSOCKET', 'FTP_ENTRY_PATH', 'CERTINFO',
'TLS_SESSION',
'RTSP_SESSION_ID', 'RTSP_CLIENT_CSEQ', 'RTSP_SERVER_CSEQ', 'RTSP_CSEQ_RECV'
);
'RTSP_SESSION_ID', 'RTSP_CLIENT_CSEQ', 'RTSP_SERVER_CSEQ', 'RTSP_CSEQ_RECV'
);
@@
-52,29
+51,31
@@
$translate = array(
$templates = array(
'STRING' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &c)) {
$templates = array(
'STRING' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &c)) {
- add_assoc_string_ex(&array, "%s", sizeof("%2$s"), c ? c : "", 1);
+ ZVAL_STRING(&tmp, STR_PTR(c));
+ zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
'DOUBLE' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &d)) {
}
',
'DOUBLE' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &d)) {
- add_assoc_double_ex(&array, "%s", sizeof("%2$s"), d);
+ ZVAL_DOUBLE(&tmp, d);
+ zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
'LONG' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &l)) {
}
',
'LONG' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &l)) {
- add_assoc_long_ex(&array, "%s", sizeof("%2$s"), l);
+ ZVAL_LONG(&tmp, l);
+ zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
'SLIST' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &s)) {
}
',
'SLIST' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &s)) {
- MAKE_STD_ZVAL(subarray);
- array_init(subarray);
+ array_init(&tmp);
for (p = s; p; p = p->next) {
if (p->data) {
for (p = s; p; p = p->next) {
if (p->data) {
- add_next_index_string(
subarray, p->data, 1
);
+ add_next_index_string(
&tmp, p->data
);
}
}
}
}
-
add_assoc_zval_ex(&array, "%s", sizeof("%2$s"), subarray
);
+
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp
);
curl_slist_free_all(s);
}
',
curl_slist_free_all(s);
}
',
@@
-91,8
+92,8
@@
foreach ($infos as $info) {
if (isset($ifdefs[$short])) printf("#endif\n");
}
if (isset($ifdefs[$short])) printf("#endif\n");
}
-file_put_contents("php_http_c
url_client
.c",
+file_put_contents("php_http_c
lient_curl
.c",
preg_replace('/(\/\* BEGIN::CURLINFO \*\/\n).*(\n\s*\/\* END::CURLINFO \*\/)/s', '$1'. ob_get_contents() .'$2',
preg_replace('/(\/\* BEGIN::CURLINFO \*\/\n).*(\n\s*\/\* END::CURLINFO \*\/)/s', '$1'. ob_get_contents() .'$2',
- file_get_contents("php_http_c
url_client
.c")));
+ file_get_contents("php_http_c
lient_curl
.c")));
?>
?>