X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=php_http_client_curl.c;h=77c6123e434bbc0b9a3d941f531d48f1474e8a27;hb=refs%2Ftags%2FRELEASE_2_0_3;hp=52e5e0278788af16cb082dbaaa4a7a4901f9693a;hpb=a00df7ba31ebf62332b6592ce52ffc96e1bf2b3b;p=m6w6%2Fext-http diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 52e5e02..77c6123 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -17,20 +17,20 @@ #if PHP_HTTP_HAVE_EVENT # if !PHP_HTTP_HAVE_EVENT2 && /* just be really sure */ !(LIBEVENT_VERSION_NUMBER >= 0x02000000) -# include +# include # define event_base_new event_init # define event_assign(e, b, s, a, cb, d) do {\ event_set(e, s, a, cb, d); \ event_base_set(b, e); \ } while(0) -# else -# if PHP_HTTP_HAVE_EVENT2 -# include -# include -# else -# error "libevent presence is unknown" -# endif -# endif +# else +# if PHP_HTTP_HAVE_EVENT2 +# include +# include +# else +# error "libevent presence is unknown" +# endif +# endif # ifndef DBG_EVENTS # define DBG_EVENTS 0 # endif @@ -1980,7 +1980,11 @@ PHP_MINIT_FUNCTION(http_client_curl) PHP_MSHUTDOWN_FUNCTION(http_client_curl) { + php_persistent_handle_cleanup(ZEND_STRL("http\\Client\\Curl"), NULL, 0 TSRMLS_CC); + php_persistent_handle_cleanup(ZEND_STRL("http\\Client\\Curl\\Request"), NULL, 0 TSRMLS_CC); + php_http_options_dtor(&php_http_curle_options); + return SUCCESS; }