X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_response_object.c;h=b25da77f70620ba1664f661d1bc43c482deb0e51;hp=d85d36613485d0a66a7af8e2e077fd2494ec73b4;hb=a83c1c9e69c84c90c314332b544ea1d73cfa2fcf;hpb=6cb8b71e819cbeef5bc5383a64452a36f56de17f diff --git a/http_response_object.c b/http_response_object.c index d85d366..b25da77 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -143,10 +143,6 @@ HTTP_EMPTY_ARGS(getRequestBody, 0); #define http_response_object_declare_default_properties() _http_response_object_declare_default_properties(TSRMLS_C) static inline void _http_response_object_declare_default_properties(TSRMLS_D); -#if BROKEN_STATICS -HashTable http_response_statics; -#endif - zend_class_entry *http_response_object_ce; zend_function_entry http_response_object_fe[] = { @@ -776,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; } @@ -934,7 +930,7 @@ PHP_METHOD(HttpResponse, capture) php_end_ob_buffers(0 TSRMLS_CC); php_start_ob_buffer(NULL, 0, 0 TSRMLS_CC); -#if (PHP_MAJOR_VERSION > 5) || (PHP_MINOR_VERSION > 0) +#ifndef WONKY /* register shutdown function -- messing around with ob and headers only works in PHP-5.1 or greater */ { @@ -956,7 +952,7 @@ PHP_METHOD(HttpResponse, capture) } /* }}} */ -#endif /* ZEND_ENGINE_2 */ +#endif /* ZEND_ENGINE_2 && !WONKY */ /* * Local variables: