From: Michael Wallner Date: Mon, 30 May 2005 12:08:09 +0000 (+0000) Subject: - might want to use HTTP_STATIC_ME_ALIAS() for other classes too X-Git-Tag: RELEASE_0_8_0~13 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=b86d629d9dcddf60e3b3abb3368f7fdab1879e7b;ds=sidebyside - might want to use HTTP_STATIC_ME_ALIAS() for other classes too --- diff --git a/http_util_object.c b/http_util_object.c index bae9119..d3ef41c 100644 --- a/http_util_object.c +++ b/http_util_object.c @@ -55,32 +55,31 @@ ZEND_END_ARG_INFO(); 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) + 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(redirect, http_redirect, NULL) + HTTP_STATIC_ME_ALIAS(sendStatus, http_send_status, NULL) + HTTP_STATIC_ME_ALIAS(sendLastModified, http_send_last_modified, NULL) + HTTP_STATIC_ME_ALIAS(sendContentType, http_send_content_type, NULL) + HTTP_STATIC_ME_ALIAS(sendContentDisposition, http_send_content_disposition, NULL) + HTTP_STATIC_ME_ALIAS(matchModified, http_match_modified, NULL) + HTTP_STATIC_ME_ALIAS(matchEtag, http_match_etag, NULL) + HTTP_STATIC_ME_ALIAS(cacheLastModified, http_cache_last_modified, NULL) + HTTP_STATIC_ME_ALIAS(cacheEtag, http_cache_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(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(postFields, http_post_fields, http_request_info_ref_5) + HTTP_STATIC_ME_ALIAS(get, http_get, http_request_info_ref_3) + HTTP_STATIC_ME_ALIAS(head, http_head, http_request_info_ref_3) + HTTP_STATIC_ME_ALIAS(postData, http_post_data, http_request_info_ref_4) + HTTP_STATIC_ME_ALIAS(postFields, http_post_fields, http_request_info_ref_5) #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(authBasic, http_auth_basic, NULL) + HTTP_STATIC_ME_ALIAS(authBasicCallback, http_auth_basic_cb, NULL) {NULL, NULL, NULL} }; diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 4d36587..42b67ed 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -171,6 +171,7 @@ typedef int STATUS; /* {{{ objects & properties */ #ifdef ZEND_ENGINE_2 +# define HTTP_STATIC_ME_ALIAS(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) # define HTTP_REGISTER_CLASS_EX(classname, name, parent, flags) \ { \