From: Michael Wallner Date: Thu, 22 Dec 2005 11:15:38 +0000 (+0000) Subject: - no need for a explicit destructor any longer X-Git-Tag: RELEASE_0_21_0~47 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=dfb24ad31bc849fc26ced49218c161e5a03183b5;p=m6w6%2Fext-http - no need for a explicit destructor any longer --- diff --git a/http_request_object.c b/http_request_object.c index 5d02c3e..1026317 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -39,7 +39,6 @@ ZEND_EXTERN_MODULE_GLOBALS(http); #define HTTP_REQUEST_ME(method, visibility) PHP_ME(HttpRequest, method, HTTP_ARGS(HttpRequest, method), visibility) #define HTTP_REQUEST_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpRequest, method)) -HTTP_EMPTY_ARGS(__destruct, 0); HTTP_BEGIN_ARGS(__construct, 0, 0) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(method, 0) @@ -217,7 +216,6 @@ static inline void _http_request_object_declare_default_properties(TSRMLS_D); zend_class_entry *http_request_object_ce; zend_function_entry http_request_object_fe[] = { HTTP_REQUEST_ME(__construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - HTTP_REQUEST_ME(__destruct, ZEND_ACC_PUBLIC|ZEND_ACC_DTOR) HTTP_REQUEST_ME(setOptions, ZEND_ACC_PUBLIC) HTTP_REQUEST_ME(getOptions, ZEND_ACC_PUBLIC) @@ -687,18 +685,6 @@ PHP_METHOD(HttpRequest, __construct) } /* }}} */ -/* {{{ proto void HttpRequest::__destruct() - * - * Destroys the HttpRequest object. - */ -PHP_METHOD(HttpRequest, __destruct) -{ - getObject(http_request_object, obj); - - NO_ARGS; -} -/* }}} */ - /* {{{ proto bool HttpRequest::setOptions([array options]) * * Set the request options to use. See http_get() for a full list of available options. @@ -1293,6 +1279,7 @@ PHP_METHOD(HttpRequest, addRawPostData) zval *zdata = GET_PROP(obj, rawPostData); SEPARATE_ZVAL(&zdata); + convert_to_string(zdata); Z_STRVAL_P(zdata) = erealloc(Z_STRVAL_P(zdata), (Z_STRLEN_P(zdata) += data_len) + 1); Z_STRVAL_P(zdata)[Z_STRLEN_P(zdata)] = '\0'; memcpy(Z_STRVAL_P(zdata) + Z_STRLEN_P(zdata) - data_len, raw_data, data_len); @@ -1396,7 +1383,7 @@ PHP_METHOD(HttpRequest, setPostFiles) MAKE_STD_ZVAL(post); array_init(post); if (files && (Z_TYPE_P(files) == IS_ARRAY)) { - array_copy(files, post) + array_copy(files, post); } SET_PROP(obj, postFiles, post); diff --git a/php_http_request_object.h b/php_http_request_object.h index 35d7a37..84f94d6 100644 --- a/php_http_request_object.h +++ b/php_http_request_object.h @@ -46,7 +46,6 @@ extern STATUS _http_request_object_requesthandler(http_request_object *obj, zval extern STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this_ptr TSRMLS_DC); PHP_METHOD(HttpRequest, __construct); -PHP_METHOD(HttpRequest, __destruct); PHP_METHOD(HttpRequest, setOptions); PHP_METHOD(HttpRequest, getOptions); PHP_METHOD(HttpRequest, setSslOptions);