X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_response_object.c;h=85fef4911e7fa8d7c47b598be21fcb539c99d4c0;hp=4227a907efe087d76a3bb55284d89dc107b95e33;hb=e8608b78db949f6806ee47709aa6799affe69b9e;hpb=726313e8fe766b0b85c256ec5c6adcc95119ffba diff --git a/http_response_object.c b/http_response_object.c index 4227a90..85fef49 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -289,7 +289,7 @@ PHP_METHOD(HttpResponse, getHeader) array_init(return_value); array_copy(headers, return_value); } else if (SUCCESS == zend_hash_find(Z_ARRVAL_P(headers), name, name_len + 1, (void **) &header)) { - RETURN_ZVAL(*header, ZVAL_PTR_DTOR, 1); + RETURN_ZVAL(*header, 1, 0); } else { RETURN_NULL(); } @@ -772,19 +772,19 @@ PHP_METHOD(HttpResponse, send) /* capture mode */ if (Z_BVAL_P(GET_STATIC_PROP(catch))) { - zval the_data; + zval *the_data; - INIT_PZVAL(&the_data); - php_ob_get_buffer(&the_data TSRMLS_CC); - SET_STATIC_PROP(data, &the_data); + MAKE_STD_ZVAL(the_data); + php_ob_get_buffer(the_data TSRMLS_CC); + SET_STATIC_PROP(data, the_data); ZVAL_LONG(GET_STATIC_PROP(mode), SEND_DATA); if (!Z_STRLEN_P(GET_STATIC_PROP(eTag))) { - char *etag = http_etag(Z_STRVAL(the_data), Z_STRLEN(the_data), SEND_DATA); + char *etag = http_etag(Z_STRVAL_P(the_data), Z_STRLEN_P(the_data), SEND_DATA); UPD_STATIC_PROP(string, eTag, etag); efree(etag); } - zval_dtor(&the_data); + zval_ptr_dtor(&the_data); clean_ob = 1; } @@ -909,10 +909,6 @@ PHP_METHOD(HttpResponse, send) * HttpResponse::setCache(true); * HttpResponse::capture(); * // script follows - * // note that you need to call - * HttpResponse::send(); - * // at the end of the script unless - * // you use PHP-5.1 or greater * ?> * */