From: Pierre Joye Date: Wed, 27 May 2009 22:38:53 +0000 (+0000) Subject: - mf53: fix build, stderr cannot be used as var or struct member X-Git-Tag: php-5.2.10RC2~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99eede75b14bf301eaa22ce2be1c36facda2a7c7;p=php - mf53: fix build, stderr cannot be used as var or struct member --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index e09905433f..8dfaade484 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -1462,11 +1462,11 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu break; case CURLOPT_STDERR: if (((php_stream *) what)->mode[0] != 'r') { - if (ch->handlers->stderr) { - zval_ptr_dtor(&ch->handlers->stderr); + if (ch->handlers->std_err) { + zval_ptr_dtor(&ch->handlers->std_err); } zval_add_ref(zvalue); - ch->handlers->stderr = *zvalue; + ch->handlers->std_err = *zvalue; zend_list_addref(Z_LVAL_PP(zvalue)); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); @@ -2061,7 +2061,7 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) #endif /* Prevent crash inside cURL if passed file has already been closed */ - if (ch->handlers->stderr && ch->handlers->stderr->refcount <= 0) { + if (ch->handlers->std_err && ch->handlers->std_err->refcount <= 0) { curl_easy_setopt(ch->cp, CURLOPT_STDERR, stderr); } @@ -2087,8 +2087,8 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); } - if (ch->handlers->stderr) { - zval_ptr_dtor(&ch->handlers->stderr); + if (ch->handlers->std_err) { + zval_ptr_dtor(&ch->handlers->std_err); } if (ch->header.str_len > 0) { efree(ch->header.str); diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 071e69c6fe..87bf710759 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -101,7 +101,7 @@ typedef struct { php_curl_write *write_header; php_curl_read *read; zval *passwd; - zval *stderr; + zval *std_err; } php_curl_handlers; struct _php_curl_error {