- might want to use HTTP_STATIC_ME_ALIAS() for other classes too
authorMichael Wallner <mike@php.net>
Mon, 30 May 2005 12:08:09 +0000 (12:08 +0000)
committerMichael Wallner <mike@php.net>
Mon, 30 May 2005 12:08:09 +0000 (12:08 +0000)
http_util_object.c
php_http_std_defs.h

index bae9119b15f16f67be71a2a21f6c782d3d3e3138..d3ef41c2f35879ab92860f03ed3366270bdfdf17 100644 (file)
@@ -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}
 };
 
index 4d3658716847ccc199846e58a6051404d1f228f2..42b67edf9ade6bf635f6f7ea309e9edf1a869cd4 100644 (file)
@@ -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) \
        { \