X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_method_api.c;h=39c9aceb526a489bcce1d11c581d030e66dac131;hp=28365f73edc080d473b32b78694dd861ab97692e;hb=e9a1f5cc8b34c4c3a0ceb55698a1a6aa11cc8c2a;hpb=bb1f32fd5d06b9b9ace6517c177b0fe58c9ff57c diff --git a/http_request_method_api.c b/http_request_method_api.c index 28365f7..39c9ace 100644 --- a/http_request_method_api.c +++ b/http_request_method_api.c @@ -28,6 +28,7 @@ # include "php_http_request_object.h" #endif +#include "missing.h" #include "phpstr/phpstr.h" ZEND_EXTERN_MODULE_GLOBALS(http); @@ -174,7 +175,7 @@ PHP_HTTP_API unsigned long _http_request_method_register(const char *method_name zend_register_long_constant(http_method, method_len + 1, meth_num, CONST_CS, http_module_number TSRMLS_CC); efree(http_method); -#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) +#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) && !defined(WONKY) method_len = spprintf(&http_method, 0, "METH_%s", method); zend_declare_class_constant_long(http_request_object_ce, http_method, method_len, meth_num TSRMLS_CC); efree(http_method); @@ -196,7 +197,7 @@ PHP_HTTP_API STATUS _http_request_method_unregister(unsigned long method TSRMLS_ return FAILURE; } -#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) +#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) && !defined(WONKY) method_len = spprintf(&http_method, 0, "METH_%s", Z_STRVAL_PP(zmethod)); if ((SUCCESS != zend_hash_del(&http_request_object_ce->constants_table, http_method, method_len + 1))) { http_error_ex(HE_NOTICE, HTTP_E_REQUEST_METHOD, "Could not unregister request method: HttpRequest::%s", http_method);