* release 0.5.1
[m6w6/ext-http] / http.c
diff --git a/http.c b/http.c
index e174ba11f241aa21e7efe0d2dd24a6173b1dad89..4f375f709ff38db43dbc33e06d69edb820fe6430 100644 (file)
--- a/http.c
+++ b/http.c
@@ -755,17 +755,11 @@ static inline void _httpi_request_declare_default_properties(zend_class_entry *c
        DCL_PROP(PROTECTED, string, postData, "");
 }
 
-#define httpi_request_destroy_object _httpi_request_destroy_object
-void _httpi_request_destroy_object(void *object, zend_object_handle handle TSRMLS_DC)
-{
-       zend_objects_destroy_object(object, handle TSRMLS_CC);
-}
-
 #define httpi_request_free_object _httpi_request_free_object
 void _httpi_request_free_object(zend_object /* void */ *object TSRMLS_DC)
 {
        httpi_request_object *o = (httpi_request_object *) object;
-       
+
        if (OBJ_PROP(o)) {
                zend_hash_destroy(OBJ_PROP(o));
                FREE_HASHTABLE(OBJ_PROP(o));
@@ -791,7 +785,7 @@ zend_object_value _httpi_request_new_object(zend_class_entry *ce TSRMLS_DC)
        zend_hash_init(OBJ_PROP(o), 0, NULL, ZVAL_PTR_DTOR, 0);
        zend_hash_copy(OBJ_PROP(o), &ce->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
 
-       ov.handle = zend_objects_store_put(o, httpi_request_destroy_object, httpi_request_free_object, NULL TSRMLS_CC);
+       ov.handle = zend_objects_store_put(o, (zend_objects_store_dtor_t) zend_objects_destroy_object, httpi_request_free_object, NULL TSRMLS_CC);
        ov.handlers = &httpi_request_object_handlers;
 
        return ov;
@@ -868,9 +862,9 @@ PHP_METHOD(HTTPi_Request, __construct)
 PHP_METHOD(HTTPi_Request, __destruct)
 {
        getObject(httpi_request_object, obj);
-       
+
        NO_ARGS;
-       
+
        FREE_PARR(obj, options);
        FREE_PARR(obj, responseInfo);
        FREE_PARR(obj, responseData);
@@ -2272,7 +2266,7 @@ PHP_MINIT_FUNCTION(http)
        ZEND_INIT_MODULE_GLOBALS(http, php_http_init_globals, NULL);
        REGISTER_INI_ENTRIES();
 
-#ifdef HTTP_HAVE_CURL
+#if defined(HTTP_HAVE_CURL) && (LIBCURL_VERSION_NUM >= 0x070a05)
        REGISTER_LONG_CONSTANT("HTTP_AUTH_BASIC", CURLAUTH_BASIC, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("HTTP_AUTH_DIGEST", CURLAUTH_DIGEST, CONST_CS | CONST_PERSISTENT);
        REGISTER_LONG_CONSTANT("HTTP_AUTH_NTLM", CURLAUTH_NTLM, CONST_CS | CONST_PERSISTENT);