[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c

2009-07-26 Thread Felipe Pena
felipe   Sun, 26 Jul 2009 23:44:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286381

Log:
- Fix ZTS build

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-26 23:22:27 UTC 
(rev 286380)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-26 23:44:59 UTC 
(rev 286381)
@@ -698,7 +698,7 @@
while (*p != NULL) {
/* Do not enable cURL file protocol and make sure 
cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, file, sizeof(file)-1) != 0) {
-   php_unregister_url_stream_wrapper(*p);
+   php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, 
php_curl_wrapper TSRMLS_CC);
}
(void) *p++;

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-26 23:22:27 UTC 
(rev 286380)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-26 23:44:59 UTC 
(rev 286381)
@@ -820,7 +820,7 @@
while (*p != NULL) {
/* Do not enable cURL file protocol and make sure 
cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, file, sizeof(file)-1) != 0) {
-   php_unregister_url_stream_wrapper(*p);
+   php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, 
php_curl_wrapper TSRMLS_CC);
}
(void) *p++;

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2009-07-26 23:22:27 UTC (rev 
286380)
+++ php/php-src/trunk/ext/curl/interface.c  2009-07-26 23:44:59 UTC (rev 
286381)
@@ -820,7 +820,7 @@
while (*p != NULL) {
/* Do not enable cURL file protocol and make sure 
cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, file, sizeof(file)-1) != 0) {
-   php_unregister_url_stream_wrapper(*p);
+   php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, 
php_curl_wrapper TSRMLS_CC);
}
(void) *p++;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c

2009-07-25 Thread Felipe Pena
felipe   Sat, 25 Jul 2009 20:39:01 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=286322

Log:
- Making Valgrind happy

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/interface.c

Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-25 20:13:25 UTC 
(rev 286321)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-25 20:39:01 UTC 
(rev 286322)
@@ -2086,7 +2086,7 @@
if (ch-clone-refcount = 1) {
zend_llist_clean(ch-to_free.slist);
zend_llist_clean(ch-to_free.post);
-   zval_ptr_dtor(ch-clone);
+   FREE_ZVAL(ch-clone);
} else {
ch-clone-refcount--;
ch-to_free.slist.dtor = NULL;

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-25 20:13:25 UTC 
(rev 286321)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-25 20:39:01 UTC 
(rev 286322)
@@ -2311,7 +2311,7 @@
if (Z_REFCOUNT_P(ch-clone) = 1) {
zend_llist_clean(ch-to_free.slist);
zend_llist_clean(ch-to_free.post);
-   zval_ptr_dtor(ch-clone);
+   FREE_ZVAL(ch-clone);
} else {
Z_DELREF_P(ch-clone);
ch-to_free.slist.dtor = NULL;

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2009-07-25 20:13:25 UTC (rev 
286321)
+++ php/php-src/trunk/ext/curl/interface.c  2009-07-25 20:39:01 UTC (rev 
286322)
@@ -2377,7 +2377,7 @@
if (Z_REFCOUNT_P(ch-clone) = 1) {
zend_llist_clean(ch-to_free.slist);
zend_llist_clean(ch-to_free.post);
-   zval_ptr_dtor(ch-clone);
+   FREE_ZVAL(ch-clone);
} else {
Z_DELREF_P(ch-clone);
ch-to_free.slist.dtor = NULL;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: php/php-src/ branches/PHP_5_2/ext/curl/interface.c branches/PHP_5_3/ext/curl/interface.c trunk/ext/curl/interface.c

2009-07-19 Thread Felipe Pena
felipe  Sun, 19 Jul 2009 14:36:16 +

URL: http://svn.php.net/viewvc?view=revisionrevision=284352

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
U   php/php-src/trunk/ext/curl/interface.c

Log:
- Removed unnecessary strlen() call and if statement.


Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-19 14:19:32 UTC 
(rev 284351)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-19 14:36:16 UTC 
(rev 284352)
@@ -1576,14 +1576,11 @@
char *type;
++postval;

-   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
strlen(postval {
+   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
Z_STRLEN_PP(current {
*type = '\0';
}
/* safe_mode / open_basedir 
check */
if 
(php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode)  
!php_checkuid(postval, rb+, CHECKUID_CHECK_MODE_PARAM))) {
-   if (type) {
-   *type = ';';
-   }
RETVAL_FALSE;
return 1;
}

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-19 14:19:32 UTC 
(rev 284351)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-19 14:36:16 UTC 
(rev 284352)
@@ -1803,14 +1803,11 @@
char *type;
++postval;

-   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
strlen(postval {
+   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
Z_STRLEN_PP(current {
*type = '\0';
}
/* safe_mode / open_basedir 
check */
if 
(php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode)  
!php_checkuid(postval, rb+, CHECKUID_CHECK_MODE_PARAM))) {
-   if (type) {
-   *type = ';';
-   }
RETVAL_FALSE;
return 1;
}

Modified: php/php-src/trunk/ext/curl/interface.c
===
--- php/php-src/trunk/ext/curl/interface.c  2009-07-19 14:19:32 UTC (rev 
284351)
+++ php/php-src/trunk/ext/curl/interface.c  2009-07-19 14:36:16 UTC (rev 
284352)
@@ -1866,14 +1866,11 @@
char *type;
++postval;

-   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
strlen(postval {
+   if ((type = 
php_memnstr(postval, ;type=, sizeof(;type=) - 1, postval + 
Z_STRLEN_PP(current {
*type = '\0';
}
/* open_basedir check */
if 
(php_check_open_basedir(postval TSRMLS_CC)) {
-   if (type) {
-   *type = ';';
-   }
RETVAL_FALSE;
return 1;
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php