From 12253a8360a79b01a0747fe83cf1ec37132fd916 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Fri, 21 Nov 2008 10:14:34 +0000 Subject: [PATCH] fixed another new 5_3 incompatibility (bug #15065) --- missing.h | 2 ++ package2.xml | 11 ++++++----- php_http_std_defs.h | 16 ++++++++-------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/missing.h b/missing.h index fa3eda8..d767f40 100644 --- a/missing.h +++ b/missing.h @@ -24,6 +24,7 @@ # define GLOBAL_ERROR_HANDLING EG(error_handling) # define GLOBAL_EXCEPTION_CLASS EG(exception_class) # define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC) +# define HTTP_STATIC_ARG_INFO #else # define HTTP_ZAPI_HASH_TSRMLS_CC # define HTTP_ZAPI_HASH_TSRMLS_DC @@ -31,6 +32,7 @@ # define GLOBAL_ERROR_HANDLING PG(error_handling) # define GLOBAL_EXCEPTION_CLASS PG(exception_class) # define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp)) +# define HTTP_STATIC_ARG_INFO static #endif #if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION == 0) diff --git a/package2.xml b/package2.xml index cfdc087..4a0e384 100644 --- a/package2.xml +++ b/package2.xml @@ -28,9 +28,9 @@ support. Parallel requests are available for PHP 5 and greater. mike@php.net yes - 2008-07-23 + 2008-10-20 - 1.6.1 + 1.6.2 1.6.0 @@ -39,9 +39,10 @@ support. Parallel requests are available for PHP 5 and greater. BSD, revised errorbuffer not cleared between uses of persistent handles) -* Fixed bug #14218 (properties of class extending HttpMessage inaccessible) +* Fixed PHP-5.3 API incompatibilities (including bug #15065) +* Fixed memory corruption with headers and HttpRequest +* Fixed crash in HttpMessage::unserialize() +* Fixed bug #14826 (race condition in http_request_dtor) ]]> diff --git a/php_http_std_defs.h b/php_http_std_defs.h index fdbfafa..1930933 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -266,8 +266,8 @@ typedef int STATUS; #define HTTP_E_QUERYSTRING 13L #ifdef ZEND_ENGINE_2 -# define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args) static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args) -# define HTTP_BEGIN_ARGS_AR(class, method, ret_ref, req_args) static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 1, ret_ref, req_args) +# define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args) HTTP_STATIC_ARG_INFO ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args) +# define HTTP_BEGIN_ARGS_AR(class, method, ret_ref, req_args) HTTP_STATIC_ARG_INFO ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 1, ret_ref, req_args) # define HTTP_END_ARGS } # define HTTP_EMPTY_ARGS_EX(class, method, ret_ref) HTTP_BEGIN_ARGS_EX(class, method, ret_ref, 0) HTTP_END_ARGS # define HTTP_ARGS(class, method) args_for_ ##class## _ ##method @@ -284,20 +284,20 @@ typedef int STATUS; #ifdef HTTP_HAVE_CURL # ifdef ZEND_ENGINE_2 # define HTTP_DECLARE_ARG_PASS_INFO() \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_3, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_4, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ @@ -305,7 +305,7 @@ typedef int STATUS; ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_5, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ @@ -324,13 +324,13 @@ typedef int STATUS; #else # ifdef ZEND_ENGINE_2 # define HTTP_DECLARE_ARG_PASS_INFO() \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); \ \ - static \ + HTTP_STATIC_ARG_INFO \ ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_4, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(0) \ -- 2.30.2