X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_method_api.c;h=9e5c79a0c9be133c63ea940ceeff001708627223;hp=be19f492ce9832609e4028e9c83a8724d2283862;hb=5dc71016d93c6e05fc9c6e933b934dfe9ab277fb;hpb=266dd631dcb4e0652522ad4884ee8a40b88532ec diff --git a/http_request_method_api.c b/http_request_method_api.c index be19f49..9e5c79a 100644 --- a/http_request_method_api.c +++ b/http_request_method_api.c @@ -15,19 +15,18 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif -#include "php.h" +#define HTTP_WANT_CURL #include "php_http.h" -#include "php_http_std_defs.h" + #include "php_http_api.h" +#include "php_http_request_api.h" #include "php_http_request_method_api.h" -#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) + +#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL) && !defined(WONKY) # include "php_http_request_object.h" #endif -#include "missing.h" -#include "phpstr/phpstr.h" - ZEND_EXTERN_MODULE_GLOBALS(http); /* {{{ char *http_request_methods[] */ @@ -148,8 +147,9 @@ PHP_HTTP_API ulong _http_request_method_exists(zend_bool by_name, ulong id, cons zval **data; char *key; ulong idx; + HashPosition pos; - FOREACH_HASH_KEYVAL(&HTTP_G(request).methods.custom, key, idx, data) { + FOREACH_HASH_KEYVAL(pos, &HTTP_G(request).methods.custom, key, idx, data) { if (!strcmp(name, Z_STRVAL_PP(data))) { return idx + HTTP_MAX_REQUEST_METHOD; }