From: Michael Wallner Date: Mon, 6 Feb 2006 21:02:07 +0000 (+0000) Subject: - we actually never return by ref X-Git-Tag: RELEASE_0_23_0~26 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=1a0dbb96fbe46a2edec1c813798cef7b0898eebe;p=m6w6%2Fext-http - we actually never return by ref --- diff --git a/http.c b/http.c index 00f8919..8310409 100644 --- a/http.c +++ b/http.c @@ -349,8 +349,9 @@ PHP_MINFO_FUNCTION(http) "HttpInflateStream, " # endif # ifndef WONKY - "HttpResponse" + "HttpResponse, " # endif + "HttpQueryString" #endif ); php_info_print_table_row(2, "Output Handlers", "ob_deflatehandler, ob_inflatehandler, ob_etaghandler"); diff --git a/http_deflatestream_object.c b/http_deflatestream_object.c index 560cdc6..0caa74b 100644 --- a/http_deflatestream_object.c +++ b/http_deflatestream_object.c @@ -22,23 +22,23 @@ #include "php_http_exception_object.h" #include "php_http_deflatestream_object.h" -#define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpDeflateStream, method, ret_ref, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpDeflateStream, method, ret_ref) -#define HTTP_DEFLATE_ME(method, visibility) PHP_ME(HttpDeflateStream, method, HTTP_ARGS(HttpDeflateStream, method), visibility) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpDeflateStream, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpDeflateStream, method, 0) +#define HTTP_DEFLATE_ME(method, visibility) PHP_ME(HttpDeflateStream, method, HTTP_ARGS(HttpDeflateStream, method), visibility) -HTTP_BEGIN_ARGS(__construct, 0, 0) +HTTP_BEGIN_ARGS(__construct, 0) HTTP_ARG_VAL(flags, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(update, 0, 1) +HTTP_BEGIN_ARGS(update, 1) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(flush, 0, 0) +HTTP_BEGIN_ARGS(flush, 0) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(finish, 0, 0) +HTTP_BEGIN_ARGS(finish, 0) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; diff --git a/http_inflatestream_object.c b/http_inflatestream_object.c index 73225bd..31c728f 100644 --- a/http_inflatestream_object.c +++ b/http_inflatestream_object.c @@ -22,19 +22,19 @@ #include "php_http_exception_object.h" #include "php_http_inflatestream_object.h" -#define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpInflateStream, method, ret_ref, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpInflateStream, method, ret_ref) -#define HTTP_INFLATE_ME(method, visibility) PHP_ME(HttpInflateStream, method, HTTP_ARGS(HttpInflateStream, method), visibility) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpInflateStream, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpInflateStream, method, 0) +#define HTTP_INFLATE_ME(method, visibility) PHP_ME(HttpInflateStream, method, HTTP_ARGS(HttpInflateStream, method), visibility) -HTTP_BEGIN_ARGS(update, 0, 1) +HTTP_BEGIN_ARGS(update, 1) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(flush, 0, 0) +HTTP_BEGIN_ARGS(flush, 0) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(finish, 0, 0) +HTTP_BEGIN_ARGS(finish, 0) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; diff --git a/http_message_object.c b/http_message_object.c index 7af330d..d275004 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -39,86 +39,86 @@ extern PHPAPI zend_class_entry *spl_ce_Countable; # endif #endif -#define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpMessage, method, ret_ref, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpMessage, method, ret_ref) -#define HTTP_MESSAGE_ME(method, visibility) PHP_ME(HttpMessage, method, HTTP_ARGS(HttpMessage, method), visibility) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpMessage, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpMessage, method, 0) +#define HTTP_MESSAGE_ME(method, visibility) PHP_ME(HttpMessage, method, HTTP_ARGS(HttpMessage, method), visibility) -HTTP_BEGIN_ARGS(__construct, 0, 0) +HTTP_BEGIN_ARGS(__construct, 0) HTTP_ARG_VAL(message, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(fromString, 1, 1) +HTTP_BEGIN_ARGS(fromString, 1) HTTP_ARG_VAL(message, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getBody, 0); -HTTP_BEGIN_ARGS(setBody, 0, 1) +HTTP_EMPTY_ARGS(getBody); +HTTP_BEGIN_ARGS(setBody, 1) HTTP_ARG_VAL(body, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getHeaders, 0); -HTTP_BEGIN_ARGS(setHeaders, 0, 1) +HTTP_EMPTY_ARGS(getHeaders); +HTTP_BEGIN_ARGS(setHeaders, 1) HTTP_ARG_VAL(headers, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addHeaders, 0, 1) +HTTP_BEGIN_ARGS(addHeaders, 1) HTTP_ARG_VAL(headers, 0) HTTP_ARG_VAL(append, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getType, 0); -HTTP_BEGIN_ARGS(setType, 0, 1) +HTTP_EMPTY_ARGS(getType); +HTTP_BEGIN_ARGS(setType, 1) HTTP_ARG_VAL(type, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getResponseCode, 0); -HTTP_BEGIN_ARGS(setResponseCode, 0, 1) +HTTP_EMPTY_ARGS(getResponseCode); +HTTP_BEGIN_ARGS(setResponseCode, 1) HTTP_ARG_VAL(response_code, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getResponseStatus, 0); -HTTP_BEGIN_ARGS(setResponseStatus, 0, 1) +HTTP_EMPTY_ARGS(getResponseStatus); +HTTP_BEGIN_ARGS(setResponseStatus, 1) HTTP_ARG_VAL(response_status, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getRequestMethod, 0); -HTTP_BEGIN_ARGS(setRequestMethod, 0, 1) +HTTP_EMPTY_ARGS(getRequestMethod); +HTTP_BEGIN_ARGS(setRequestMethod, 1) HTTP_ARG_VAL(request_method, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getRequestUrl, 0); -HTTP_BEGIN_ARGS(setRequestUrl, 0, 1) +HTTP_EMPTY_ARGS(getRequestUrl); +HTTP_BEGIN_ARGS(setRequestUrl, 1) HTTP_ARG_VAL(url, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getHttpVersion, 0); -HTTP_BEGIN_ARGS(setHttpVersion, 0, 1) +HTTP_EMPTY_ARGS(getHttpVersion); +HTTP_BEGIN_ARGS(setHttpVersion, 1) HTTP_ARG_VAL(http_version, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getParentMessage, 0); -HTTP_EMPTY_ARGS(send, 0); -HTTP_BEGIN_ARGS(toString, 0, 0) +HTTP_EMPTY_ARGS(getParentMessage); +HTTP_EMPTY_ARGS(send); +HTTP_BEGIN_ARGS(toString, 0) HTTP_ARG_VAL(include_parent, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(toMessageTypeObject, 0); +HTTP_EMPTY_ARGS(toMessageTypeObject); -HTTP_EMPTY_ARGS(count, 0); +HTTP_EMPTY_ARGS(count); -HTTP_EMPTY_ARGS(serialize, 0); -HTTP_BEGIN_ARGS(unserialize, 0, 1) +HTTP_EMPTY_ARGS(serialize); +HTTP_BEGIN_ARGS(unserialize, 1) HTTP_ARG_VAL(serialized, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(rewind, 0); -HTTP_EMPTY_ARGS(valid, 0); -HTTP_EMPTY_ARGS(key, 0); -HTTP_EMPTY_ARGS(current, 0); -HTTP_EMPTY_ARGS(next, 0); +HTTP_EMPTY_ARGS(rewind); +HTTP_EMPTY_ARGS(valid); +HTTP_EMPTY_ARGS(key); +HTTP_EMPTY_ARGS(current); +HTTP_EMPTY_ARGS(next); -HTTP_EMPTY_ARGS(detach, 0); -HTTP_BEGIN_ARGS(prepend, 0, 1) +HTTP_EMPTY_ARGS(detach); +HTTP_BEGIN_ARGS(prepend, 1) HTTP_ARG_OBJ(HttpMessage, message, 0) HTTP_END_ARGS; diff --git a/http_querystring_object.c b/http_querystring_object.c index 83f1dc6..4da97b3 100644 --- a/http_querystring_object.c +++ b/http_querystring_object.c @@ -25,37 +25,37 @@ #include "php_http_querystring_object.h" #include "php_http_exception_object.h" -#define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpQueryString, method, ret_ref, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpQueryString, method, ret_ref) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpQueryString, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpQueryString, method, 0) #define HTTP_QUERYSTRING_ME(method, visibility) PHP_ME(HttpQueryString, method, HTTP_ARGS(HttpQueryString, method), visibility) #define HTTP_QUERYSTRING_GME(method, visibility) PHP_ME(HttpQueryString, method, HTTP_ARGS(HttpQueryString, __getter), visibility) -HTTP_BEGIN_ARGS(__construct, 0, 0) +HTTP_BEGIN_ARGS(__construct, 0) HTTP_ARG_VAL(global, 0) HTTP_ARG_VAL(params, 0) HTTP_END_ARGS; #ifndef WONKY -HTTP_BEGIN_ARGS(getInstance, 0, 0) +HTTP_BEGIN_ARGS(getInstance, 0) HTTP_ARG_VAL(global, 0) HTTP_END_ARGS; #endif -HTTP_EMPTY_ARGS(toArray, 0); -HTTP_EMPTY_ARGS(toString, 0); +HTTP_EMPTY_ARGS(toArray); +HTTP_EMPTY_ARGS(toString); -HTTP_BEGIN_ARGS(get, 0, 0) +HTTP_BEGIN_ARGS(get, 0) HTTP_ARG_VAL(name, 0) HTTP_ARG_VAL(type, 0) HTTP_ARG_VAL(defval, 0) HTTP_ARG_VAL(delete, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(set, 0, 1) +HTTP_BEGIN_ARGS(set, 1) HTTP_ARG_VAL(params, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(__getter, 0, 1) +HTTP_BEGIN_ARGS(__getter, 1) HTTP_ARG_VAL(name, 0) HTTP_ARG_VAL(defval, 0) HTTP_ARG_VAL(delete, 0) diff --git a/http_request_object.c b/http_request_object.c index a7c0beb..bb3ebf4 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -28,184 +28,184 @@ #include "php_http_request_pool_api.h" #include "php_http_url_api.h" -#define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpRequest, method, ret_ref, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpRequest, method, ret_ref) -#define HTTP_REQUEST_ME(method, visibility) PHP_ME(HttpRequest, method, HTTP_ARGS(HttpRequest, method), visibility) -#define HTTP_REQUEST_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpRequest, method)) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpRequest, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpRequest, method, 0) +#define HTTP_REQUEST_ME(method, visibility) PHP_ME(HttpRequest, method, HTTP_ARGS(HttpRequest, method), visibility) +#define HTTP_REQUEST_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpRequest, method)) -HTTP_BEGIN_ARGS(__construct, 0, 0) +HTTP_BEGIN_ARGS(__construct, 0) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(method, 0) HTTP_ARG_VAL(options, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getOptions, 0); -HTTP_BEGIN_ARGS(setOptions, 0, 0) +HTTP_EMPTY_ARGS(getOptions); +HTTP_BEGIN_ARGS(setOptions, 0) HTTP_ARG_VAL(options, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getSslOptions, 0); -HTTP_BEGIN_ARGS(setSslOptions, 0, 0) +HTTP_EMPTY_ARGS(getSslOptions); +HTTP_BEGIN_ARGS(setSslOptions, 0) HTTP_ARG_VAL(ssl_options, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addSslOptions, 0, 0) +HTTP_BEGIN_ARGS(addSslOptions, 0) HTTP_ARG_VAL(ssl_optins, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getHeaders, 0); -HTTP_BEGIN_ARGS(setHeaders, 0, 0) +HTTP_EMPTY_ARGS(getHeaders); +HTTP_BEGIN_ARGS(setHeaders, 0) HTTP_ARG_VAL(headers, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addHeaders, 0, 1) +HTTP_BEGIN_ARGS(addHeaders, 1) HTTP_ARG_VAL(headers, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getCookies, 0); -HTTP_BEGIN_ARGS(setCookies, 0, 0) +HTTP_EMPTY_ARGS(getCookies); +HTTP_BEGIN_ARGS(setCookies, 0) HTTP_ARG_VAL(cookies, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addCookies, 0, 1) +HTTP_BEGIN_ARGS(addCookies, 1) HTTP_ARG_VAL(cookies, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getUrl, 0); -HTTP_BEGIN_ARGS(setUrl, 0, 1) +HTTP_EMPTY_ARGS(getUrl); +HTTP_BEGIN_ARGS(setUrl, 1) HTTP_ARG_VAL(url, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getMethod, 0); -HTTP_BEGIN_ARGS(setMethod, 0, 1) +HTTP_EMPTY_ARGS(getMethod); +HTTP_BEGIN_ARGS(setMethod, 1) HTTP_ARG_VAL(request_method, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getContentType, 0); -HTTP_BEGIN_ARGS(setContentType, 0, 1) +HTTP_EMPTY_ARGS(getContentType); +HTTP_BEGIN_ARGS(setContentType, 1) HTTP_ARG_VAL(content_type, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getQueryData, 0); -HTTP_BEGIN_ARGS(setQueryData, 0, 0) +HTTP_EMPTY_ARGS(getQueryData); +HTTP_BEGIN_ARGS(setQueryData, 0) HTTP_ARG_VAL(query_data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addQueryData, 0, 1) +HTTP_BEGIN_ARGS(addQueryData, 1) HTTP_ARG_VAL(query_data, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getPostFields, 0); -HTTP_BEGIN_ARGS(setPostFields, 0, 0) +HTTP_EMPTY_ARGS(getPostFields); +HTTP_BEGIN_ARGS(setPostFields, 0) HTTP_ARG_VAL(post_fields, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addPostFields, 0, 1) +HTTP_BEGIN_ARGS(addPostFields, 1) HTTP_ARG_VAL(post_fields, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getPostFiles, 0); -HTTP_BEGIN_ARGS(setPostFiles, 0, 0) +HTTP_EMPTY_ARGS(getPostFiles); +HTTP_BEGIN_ARGS(setPostFiles, 0) HTTP_ARG_VAL(post_files, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addPostFile, 0, 2) +HTTP_BEGIN_ARGS(addPostFile, 2) HTTP_ARG_VAL(formname, 0) HTTP_ARG_VAL(filename, 0) HTTP_ARG_VAL(content_type, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getRawPostData, 0); -HTTP_BEGIN_ARGS(setRawPostData, 0, 0) +HTTP_EMPTY_ARGS(getRawPostData); +HTTP_BEGIN_ARGS(setRawPostData, 0) HTTP_ARG_VAL(raw_post_data, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(addRawPostData, 0, 1) +HTTP_BEGIN_ARGS(addRawPostData, 1) HTTP_ARG_VAL(raw_post_data, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getPutFile, 0); -HTTP_BEGIN_ARGS(setPutFile, 0, 0) +HTTP_EMPTY_ARGS(getPutFile); +HTTP_BEGIN_ARGS(setPutFile, 0) HTTP_ARG_VAL(filename, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getResponseData, 0); -HTTP_BEGIN_ARGS(getResponseHeader, 0, 0) +HTTP_EMPTY_ARGS(getResponseData); +HTTP_BEGIN_ARGS(getResponseHeader, 0) HTTP_ARG_VAL(name, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(getResponseCookie, 0, 0) +HTTP_BEGIN_ARGS(getResponseCookie, 0) HTTP_ARG_VAL(name, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getResponseBody, 0); -HTTP_EMPTY_ARGS(getResponseCode, 0); -HTTP_EMPTY_ARGS(getResponseStatus, 0); -HTTP_BEGIN_ARGS(getResponseInfo, 0, 0) +HTTP_EMPTY_ARGS(getResponseBody); +HTTP_EMPTY_ARGS(getResponseCode); +HTTP_EMPTY_ARGS(getResponseStatus); +HTTP_BEGIN_ARGS(getResponseInfo, 0) HTTP_ARG_VAL(name, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getResponseMessage, 0); -HTTP_EMPTY_ARGS(getRawResponseMessage, 0); -HTTP_EMPTY_ARGS(getRequestMessage, 0); -HTTP_EMPTY_ARGS(getRawRequestMessage, 0); -HTTP_EMPTY_ARGS(getHistory, 0); -HTTP_EMPTY_ARGS(clearHistory, 0); -HTTP_EMPTY_ARGS(send, 0); +HTTP_EMPTY_ARGS(getResponseMessage); +HTTP_EMPTY_ARGS(getRawResponseMessage); +HTTP_EMPTY_ARGS(getRequestMessage); +HTTP_EMPTY_ARGS(getRawRequestMessage); +HTTP_EMPTY_ARGS(getHistory); +HTTP_EMPTY_ARGS(clearHistory); +HTTP_EMPTY_ARGS(send); -HTTP_BEGIN_ARGS(get, 0, 1) +HTTP_BEGIN_ARGS(get, 1) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(head, 0, 1) +HTTP_BEGIN_ARGS(head, 1) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(postData, 0, 2) +HTTP_BEGIN_ARGS(postData, 2) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(data, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(postFields, 0, 2) +HTTP_BEGIN_ARGS(postFields, 2) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(data, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(putFile, 0, 2) +HTTP_BEGIN_ARGS(putFile, 2) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(file, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(putStream, 0, 2) +HTTP_BEGIN_ARGS(putStream, 2) HTTP_ARG_VAL(url, 0) HTTP_ARG_VAL(stream, 0) HTTP_ARG_VAL(options, 0) HTTP_ARG_VAL(info, 1) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(methodRegister, 0, 1) +HTTP_BEGIN_ARGS(methodRegister, 1) HTTP_ARG_VAL(method_name, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(methodUnregister, 0, 1) +HTTP_BEGIN_ARGS(methodUnregister, 1) HTTP_ARG_VAL(method, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(methodName, 0, 1) +HTTP_BEGIN_ARGS(methodName, 1) HTTP_ARG_VAL(method_id, 0) HTTP_END_ARGS; -HTTP_BEGIN_ARGS(methodExists, 0, 1) +HTTP_BEGIN_ARGS(methodExists, 1) HTTP_ARG_VAL(method, 0) HTTP_END_ARGS; diff --git a/http_requestpool_object.c b/http_requestpool_object.c index 37e8ede..fed5721 100644 --- a/http_requestpool_object.c +++ b/http_requestpool_object.c @@ -32,7 +32,7 @@ extern PHPAPI zend_class_entry *spl_ce_Countable; #endif #define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpRequestPool, method, 0, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, ret_ref) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, 0) #define HTTP_REQPOOL_ME(method, visibility) PHP_ME(HttpRequestPool, method, HTTP_ARGS(HttpRequestPool, method), visibility) HTTP_BEGIN_ARGS(__construct, 0) @@ -41,8 +41,8 @@ HTTP_BEGIN_ARGS(__construct, 0) HTTP_ARG_OBJ(HttpRequest, requestN, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(__destruct, 0); -HTTP_EMPTY_ARGS(reset, 0); +HTTP_EMPTY_ARGS(__destruct); +HTTP_EMPTY_ARGS(reset); HTTP_BEGIN_ARGS(attach, 1) HTTP_ARG_OBJ(HttpRequest, request, 0) @@ -52,20 +52,20 @@ HTTP_BEGIN_ARGS(detach, 1) HTTP_ARG_OBJ(HttpRequest, request, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(send, 0); -HTTP_EMPTY_ARGS(socketPerform, 0); -HTTP_EMPTY_ARGS(socketSelect, 0); +HTTP_EMPTY_ARGS(send); +HTTP_EMPTY_ARGS(socketPerform); +HTTP_EMPTY_ARGS(socketSelect); -HTTP_EMPTY_ARGS(valid, 0); -HTTP_EMPTY_ARGS(current, 1); -HTTP_EMPTY_ARGS(key, 0); -HTTP_EMPTY_ARGS(next, 0); -HTTP_EMPTY_ARGS(rewind, 0); +HTTP_EMPTY_ARGS(valid); +HTTP_EMPTY_ARGS(current); +HTTP_EMPTY_ARGS(key); +HTTP_EMPTY_ARGS(next); +HTTP_EMPTY_ARGS(rewind); -HTTP_EMPTY_ARGS(count, 0); +HTTP_EMPTY_ARGS(count); -HTTP_EMPTY_ARGS(getAttachedRequests, 0); -HTTP_EMPTY_ARGS(getFinishedRequests, 0); +HTTP_EMPTY_ARGS(getAttachedRequests); +HTTP_EMPTY_ARGS(getFinishedRequests); #define http_requestpool_object_declare_default_properties() _http_requestpool_object_declare_default_properties(TSRMLS_C) static inline void _http_requestpool_object_declare_default_properties(TSRMLS_D); diff --git a/http_response_object.c b/http_response_object.c index 968b273..e011e7e 100644 --- a/http_response_object.c +++ b/http_response_object.c @@ -34,7 +34,7 @@ #define UPD_STATIC_STRL(n, v, l) UPD_STATIC_STRL_EX(http_response_object_ce, n, v, l) #define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpResponse, method, 0, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpResponse, method, ret_ref) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpResponse, method, 0) #define HTTP_RESPONSE_ME(method, visibility) PHP_ME(HttpResponse, method, HTTP_ARGS(HttpResponse, method), visibility|ZEND_ACC_STATIC) #define HTTP_RESPONSE_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpResponse, method)) @@ -48,33 +48,33 @@ HTTP_BEGIN_ARGS(getHeader, 0) HTTP_ARG_VAL(name, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getETag, 0); +HTTP_EMPTY_ARGS(getETag); HTTP_BEGIN_ARGS(setETag, 1) HTTP_ARG_VAL(etag, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getLastModified, 0); +HTTP_EMPTY_ARGS(getLastModified); HTTP_BEGIN_ARGS(setLastModified, 1) HTTP_ARG_VAL(timestamp, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getCache, 0); +HTTP_EMPTY_ARGS(getCache); HTTP_BEGIN_ARGS(setCache, 1) HTTP_ARG_VAL(cache, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getGzip, 0); +HTTP_EMPTY_ARGS(getGzip); HTTP_BEGIN_ARGS(setGzip, 1) HTTP_ARG_VAL(gzip, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getCacheControl, 0); +HTTP_EMPTY_ARGS(getCacheControl); HTTP_BEGIN_ARGS(setCacheControl, 1) HTTP_ARG_VAL(cache_control, 0) HTTP_ARG_VAL(max_age, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getContentType, 0); +HTTP_EMPTY_ARGS(getContentType); HTTP_BEGIN_ARGS(setContentType, 1) HTTP_ARG_VAL(content_type, 0) HTTP_END_ARGS; @@ -84,33 +84,33 @@ HTTP_BEGIN_ARGS(guessContentType, 1) HTTP_ARG_VAL(magic_mode, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getContentDisposition, 0); +HTTP_EMPTY_ARGS(getContentDisposition); HTTP_BEGIN_ARGS(setContentDisposition, 1) HTTP_ARG_VAL(filename, 0) HTTP_ARG_VAL(send_inline, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getThrottleDelay, 0); +HTTP_EMPTY_ARGS(getThrottleDelay); HTTP_BEGIN_ARGS(setThrottleDelay, 1) HTTP_ARG_VAL(seconds, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getBufferSize, 0); +HTTP_EMPTY_ARGS(getBufferSize); HTTP_BEGIN_ARGS(setBufferSize, 1) HTTP_ARG_VAL(bytes, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getData, 0); +HTTP_EMPTY_ARGS(getData); HTTP_BEGIN_ARGS(setData, 1) HTTP_ARG_VAL(data, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getStream, 0); +HTTP_EMPTY_ARGS(getStream); HTTP_BEGIN_ARGS(setStream, 1) HTTP_ARG_VAL(stream, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getFile, 0); +HTTP_EMPTY_ARGS(getFile); HTTP_BEGIN_ARGS(setFile, 1) HTTP_ARG_VAL(filepath, 0) HTTP_END_ARGS; @@ -119,7 +119,7 @@ HTTP_BEGIN_ARGS(send, 0) HTTP_ARG_VAL(clean_ob, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(capture, 0); +HTTP_EMPTY_ARGS(capture); HTTP_BEGIN_ARGS(redirect, 0) HTTP_ARG_VAL(url, 0) @@ -132,8 +132,8 @@ HTTP_BEGIN_ARGS(status, 1) HTTP_ARG_VAL(code, 0) HTTP_END_ARGS; -HTTP_EMPTY_ARGS(getRequestHeaders, 0); -HTTP_EMPTY_ARGS(getRequestBody, 0); +HTTP_EMPTY_ARGS(getRequestHeaders); +HTTP_EMPTY_ARGS(getRequestBody); #define http_response_object_declare_default_properties() _http_response_object_declare_default_properties(TSRMLS_C) static inline void _http_response_object_declare_default_properties(TSRMLS_D); diff --git a/http_util_object.c b/http_util_object.c index 5ff76a4..1bcf8a7 100644 --- a/http_util_object.c +++ b/http_util_object.c @@ -20,10 +20,10 @@ #include "php_http_util_object.h" -#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpUtil, method, 0, req_args) -#define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpUtil, method, ret_ref) +#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpUtil, method, 0, req_args) +#define HTTP_EMPTY_ARGS(method) HTTP_EMPTY_ARGS_EX(HttpUtil, method, 0) -#define HTTP_UTIL_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpUtil, method)) +#define HTTP_UTIL_ALIAS(method, func) HTTP_STATIC_ME_ALIAS(method, func, HTTP_ARGS(HttpUtil, method)) HTTP_BEGIN_ARGS(date, 0) HTTP_ARG_VAL(timestamp, 0) diff --git a/package.xml b/package.xml index a8ef2fd..984ba8b 100644 --- a/package.xml +++ b/package.xml @@ -35,7 +35,7 @@ HttpResponse BSD, revised beta + Added 'etag' request option. -+ Added missing accessors to response status text to HttpMessage and HttpRequest classes. ++ Added missing accessors for response status text to HttpMessage and HttpRequest classes. * Fixed PHP-4.4 and PHP-5.0 build. diff --git a/package2.xml b/package2.xml index ed45382..d425d16 100644 --- a/package2.xml +++ b/package2.xml @@ -47,7 +47,7 @@ HttpResponse BSD, revised