X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_util_object.c;h=b1951fbcadde6feafb15455c427cf175213fb391;hp=0c6ccf7ab73f636df812e10f2b17adf390bd660f;hb=6deee2e3d2d6282dd76e3725fe2de6c7833bd57f;hpb=4a881fb37338bfeacd40c42a97f334c9faed299a diff --git a/http_util_object.c b/http_util_object.c index 0c6ccf7..b1951fb 100644 --- a/http_util_object.c +++ b/http_util_object.c @@ -19,59 +19,27 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif - #include "php.h" -#include "php_http.h" -#include "php_http_std_defs.h" -#include "php_http_util_object.h" #ifdef ZEND_ENGINE_2 -#ifdef HTTP_HAVE_CURL -static -ZEND_BEGIN_ARG_INFO(http_request_info_ref_3, 0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(1) -ZEND_END_ARG_INFO(); - -static -ZEND_BEGIN_ARG_INFO(http_request_info_ref_4, 0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(1) -ZEND_END_ARG_INFO(); -#endif /* HTTP_HAVE_CURL */ +#include "php_http.h" +#include "php_http_std_defs.h" +#include "php_http_util_object.h" zend_class_entry *http_util_object_ce; zend_function_entry http_util_object_fe[] = { -#define HTTP_UTIL_ME(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) - HTTP_UTIL_ME(date, http_date, NULL) - HTTP_UTIL_ME(absoluteURI, http_absolute_uri, NULL) - HTTP_UTIL_ME(negotiateLanguage, http_negotiate_language, NULL) - HTTP_UTIL_ME(negotiateCharset, http_negotiate_charset, NULL) - HTTP_UTIL_ME(redirect, http_redirect, NULL) - HTTP_UTIL_ME(sendStatus, http_send_status, NULL) - HTTP_UTIL_ME(sendLastModified, http_send_last_modified, NULL) - HTTP_UTIL_ME(sendContentType, http_send_content_type, NULL) - HTTP_UTIL_ME(sendContentDisposition, http_send_content_disposition, NULL) - HTTP_UTIL_ME(matchModified, http_match_modified, NULL) - HTTP_UTIL_ME(matchEtag, http_match_etag, NULL) - HTTP_UTIL_ME(cacheLastModified, http_cache_last_modified, NULL) - HTTP_UTIL_ME(cacheEtag, http_cache_etag, NULL) - HTTP_UTIL_ME(chunkedDecode, http_chunked_decode, NULL) - HTTP_UTIL_ME(splitResponse, http_split_response, NULL) - HTTP_UTIL_ME(parseHeaders, http_parse_headers, NULL) - HTTP_UTIL_ME(getRequestHeaders, http_get_request_headers, NULL) -#ifdef HTTP_HAVE_CURL - HTTP_UTIL_ME(get, http_get, http_request_info_ref_3) - HTTP_UTIL_ME(head, http_head, http_request_info_ref_3) - HTTP_UTIL_ME(postData, http_post_data, http_request_info_ref_4) - HTTP_UTIL_ME(postArray, http_post_array, http_request_info_ref_4) -#endif /* HTTP_HAVE_CURL */ - HTTP_UTIL_ME(authBasic, http_auth_basic, NULL) - HTTP_UTIL_ME(authBasicCallback, http_auth_basic_cb, NULL) + HTTP_STATIC_ME_ALIAS(date, http_date, NULL) + HTTP_STATIC_ME_ALIAS(absoluteURI, http_absolute_uri, NULL) + HTTP_STATIC_ME_ALIAS(negotiateLanguage, http_negotiate_language, NULL) + HTTP_STATIC_ME_ALIAS(negotiateCharset, http_negotiate_charset, NULL) + HTTP_STATIC_ME_ALIAS(matchModified, http_match_modified, NULL) + HTTP_STATIC_ME_ALIAS(matchEtag, http_match_etag, NULL) + HTTP_STATIC_ME_ALIAS(chunkedDecode, http_chunked_decode, NULL) + HTTP_STATIC_ME_ALIAS(splitResponse, http_split_response, NULL) + HTTP_STATIC_ME_ALIAS(parseHeaders, http_parse_headers, NULL) + HTTP_STATIC_ME_ALIAS(authBasic, http_auth_basic, NULL) + HTTP_STATIC_ME_ALIAS(authBasicCallback, http_auth_basic_cb, NULL) {NULL, NULL, NULL} };