1
0
mirror of https://github.com/php/php-src.git synced 2026-03-28 02:02:32 +01:00

- mf53: fix build, stderr cannot be used as var or struct member

This commit is contained in:
Pierre Joye
2009-05-27 22:38:53 +00:00
parent e29517872b
commit 99eede75b1
2 changed files with 7 additions and 7 deletions

View File

@@ -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);

View File

@@ -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 {