s/IF_RETVAL_USED/if (return_value_used)/
authorMichael Wallner <mike@php.net>
Thu, 18 May 2006 17:42:47 +0000 (17:42 +0000)
committerMichael Wallner <mike@php.net>
Thu, 18 May 2006 17:42:47 +0000 (17:42 +0000)
http_functions.c
http_message_object.c
http_querystring_object.c
http_request_object.c
http_requestpool_object.c
http_response_object.c
php_http_std_defs.h

index aa8e51bba11f060ad78be3444ffb602cc0a8e6d6..155a06f08491c1eaaa2ad36b64e92e71fc199025 100644 (file)
@@ -1838,7 +1838,7 @@ PHP_FUNCTION(http_request_method_unregister)
  */
 PHP_FUNCTION(http_request_method_exists)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *method;
 
                if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &method)) {
@@ -1874,7 +1874,7 @@ PHP_FUNCTION(http_request_method_exists)
  */
 PHP_FUNCTION(http_request_method_name)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                long method;
 
                if ((SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &method)) || (method < 0)) {
index 8af5805076f966d5f4e34429f32176ed7f8b982a..3c90c58d4162524684e1fe0c802684e1d69cd2cc 100644 (file)
@@ -753,7 +753,7 @@ PHP_METHOD(HttpMessage, getBody)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                RETURN_PHPSTR(&obj->message->body, PHPSTR_FREE_NOT, 1);
        }
@@ -790,7 +790,7 @@ PHP_METHOD(HttpMessage, getHeaders)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval headers;
                getObject(http_message_object, obj);
 
@@ -862,7 +862,7 @@ PHP_METHOD(HttpMessage, getType)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                RETURN_LONG(obj->message->type);
        }
@@ -898,7 +898,7 @@ PHP_METHOD(HttpMessage, getResponseCode)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                HTTP_CHECK_MESSAGE_TYPE_RESPONSE(obj->message, RETURN_FALSE);
                RETURN_LONG(obj->message->http.info.response.code);
@@ -946,7 +946,7 @@ PHP_METHOD(HttpMessage, getResponseStatus)
 {
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                HTTP_CHECK_MESSAGE_TYPE_RESPONSE(obj->message, RETURN_FALSE);
                RETURN_STRING(obj->message->http.info.response.status, 1);
@@ -990,7 +990,7 @@ PHP_METHOD(HttpMessage, getRequestMethod)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                HTTP_CHECK_MESSAGE_TYPE_REQUEST(obj->message, RETURN_FALSE);
                RETURN_STRING(obj->message->http.info.request.method, 1);
@@ -1043,7 +1043,7 @@ PHP_METHOD(HttpMessage, getRequestUrl)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                HTTP_CHECK_MESSAGE_TYPE_REQUEST(obj->message, RETURN_FALSE);
                RETURN_STRING(obj->message->http.info.request.url, 1);
@@ -1090,7 +1090,7 @@ PHP_METHOD(HttpMessage, getHttpVersion)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                char ver[4] = {0};
                getObject(http_message_object, obj);
 
@@ -1182,7 +1182,7 @@ PHP_METHOD(HttpMessage, send)
  */
 PHP_METHOD(HttpMessage, toString)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                char *string;
                size_t length;
                zend_bool include_parent = 0;
@@ -1216,7 +1216,7 @@ PHP_METHOD(HttpMessage, toMessageTypeObject)
        
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_message_object, obj);
                
                switch (obj->message->type)
index 6f452b968ffae5e3ab2ee71f98bbdf16b124dff0..7db43decc0784f98142f245c18367f14723a9e09 100644 (file)
@@ -367,7 +367,7 @@ PHP_METHOD(HttpQueryString, set)
                }
        }
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(queryString);
        }
 }
index 207ec6c3da02fd4923196b263cead20f22b3824b..1c0f39a6b106774320dcb785e58b851a9b1e71c9 100644 (file)
@@ -772,7 +772,7 @@ static inline void _http_request_get_options_subr(INTERNAL_FUNCTION_PARAMETERS,
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *opts, **options;
 
                opts = GET_PROP(options);
@@ -900,7 +900,7 @@ PHP_METHOD(HttpRequest, getOptions)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(options);
        }
 }
@@ -1062,7 +1062,7 @@ PHP_METHOD(HttpRequest, getUrl)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(url);
        }
 }
@@ -1100,7 +1100,7 @@ PHP_METHOD(HttpRequest, getMethod)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(method);
        }
 }
@@ -1143,7 +1143,7 @@ PHP_METHOD(HttpRequest, getContentType)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(contentType);
        }
 }
@@ -1202,7 +1202,7 @@ PHP_METHOD(HttpRequest, getQueryData)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(queryData);
        }
 }
@@ -1314,7 +1314,7 @@ PHP_METHOD(HttpRequest, getPostFields)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(postFields);
        }
 }
@@ -1394,7 +1394,7 @@ PHP_METHOD(HttpRequest, getRawPostData)
 {
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(rawPostData);
        }
 }
@@ -1492,7 +1492,7 @@ PHP_METHOD(HttpRequest, getPostFiles)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(postFiles);
        }
 }
@@ -1531,7 +1531,7 @@ PHP_METHOD(HttpRequest, getPutFile)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(putFile);
        }
 }
@@ -1611,7 +1611,7 @@ PHP_METHOD(HttpRequest, getPutData)
 {
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(putData);
        }
 }
@@ -1632,7 +1632,7 @@ PHP_METHOD(HttpRequest, getResponseData)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(responseData);
        }
 }
@@ -1653,7 +1653,7 @@ PHP_METHOD(HttpRequest, getResponseData)
  */
 PHP_METHOD(HttpRequest, getResponseHeader)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *data, **headers, **header;
                char *header_name = NULL;
                int header_len = 0;
@@ -1691,7 +1691,7 @@ PHP_METHOD(HttpRequest, getResponseHeader)
  */
 PHP_METHOD(HttpRequest, getResponseCookies)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                long flags = 0;
                zval *allowed_extras_array = NULL, *data, **headers;
 
@@ -1787,7 +1787,7 @@ PHP_METHOD(HttpRequest, getResponseBody)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval **body;
                zval *data = GET_PROP(responseData);
                
@@ -1814,7 +1814,7 @@ PHP_METHOD(HttpRequest, getResponseCode)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(responseCode);
        }
 }
@@ -1830,7 +1830,7 @@ PHP_METHOD(HttpRequest, getResponseStatus)
 {
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                RETURN_PROP(responseStatus);
        }
 }
@@ -1854,7 +1854,7 @@ PHP_METHOD(HttpRequest, getResponseStatus)
  */
 PHP_METHOD(HttpRequest, getResponseInfo)
 {
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *info, **infop;
                char *info_name = NULL;
                int info_len = 0;
@@ -1935,7 +1935,7 @@ PHP_METHOD(HttpRequest, getRequestMessage)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                http_message *msg;
                getObject(http_request_object, obj);
 
@@ -1958,7 +1958,7 @@ PHP_METHOD(HttpRequest, getRawRequestMessage)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_request_object, obj);
 
                RETURN_PHPSTR_DUP(&obj->request->conv.request);
@@ -1976,7 +1976,7 @@ PHP_METHOD(HttpRequest, getRawResponseMessage)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_request_object, obj);
 
                RETURN_PHPSTR_DUP(&obj->request->conv.response);
@@ -2003,7 +2003,7 @@ PHP_METHOD(HttpRequest, getHistory)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *hist;
                
                SET_EH_THROW_HTTP();
index 4ca9de76725fdc877279c8aac222e4a065dacc2d..ddef31867fb2ee55bea053805b5dbf1c80b95d78 100644 (file)
@@ -391,7 +391,7 @@ PHP_METHOD(HttpRequestPool, valid)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_requestpool_object, obj);
                RETURN_BOOL(obj->iterator.pos >= 0 && obj->iterator.pos < zend_llist_count(&obj->pool.handles));
        }
@@ -406,7 +406,7 @@ PHP_METHOD(HttpRequestPool, current)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                long pos = 0;
                zval **current = NULL;
                zend_llist_position lpos;
@@ -433,7 +433,7 @@ PHP_METHOD(HttpRequestPool, key)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                getObject(http_requestpool_object, obj);
                RETURN_LONG(obj->iterator.pos);
        }
index f7ba0b2f18aaab8a476093b68dd33b572ab2e284..7d2f390c1644d96d0556d14b84dc2185c336b394 100644 (file)
@@ -384,7 +384,7 @@ PHP_METHOD(HttpResponse, getCache)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *cache_p, *cache = convert_to_type_ex(IS_BOOL, GET_STATIC_PROP(cache), &cache_p);
                
                RETVAL_ZVAL(cache, 1, 0);
@@ -426,7 +426,7 @@ PHP_METHOD(HttpResponse, getGzip)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *gzip_p, *gzip = convert_to_type_ex(IS_BOOL, GET_STATIC_PROP(gzip), &gzip_p);
                
                RETVAL_ZVAL(gzip, 1, 0);
@@ -485,7 +485,7 @@ PHP_METHOD(HttpResponse, getCacheControl)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *ccontrol_p, *ccontrol = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(cacheControl), &ccontrol_p);
                
                RETVAL_ZVAL(ccontrol, 1, 0);
@@ -532,7 +532,7 @@ PHP_METHOD(HttpResponse, getContentType)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *ctype_p, *ctype = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(contentType), &ctype_p);
                
                RETVAL_ZVAL(ctype, 1, 0);
@@ -643,7 +643,7 @@ PHP_METHOD(HttpResponse, getContentDisposition)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *cd_p, *cd = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(contentDisposition), &cd_p);
                
                RETVAL_ZVAL(cd, 1, 0);
@@ -686,7 +686,7 @@ PHP_METHOD(HttpResponse, getETag)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *etag_p, *etag = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(eTag), &etag_p);
                
                RETVAL_ZVAL(etag, 1, 0);
@@ -729,7 +729,7 @@ PHP_METHOD(HttpResponse, getLastModified)
 {
        NO_ARGS;
        
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *lm_p, *lm = convert_to_type_ex(IS_LONG, GET_STATIC_PROP(lastModified), &lm_p);
                
                RETVAL_ZVAL(lm, 1, 0);
@@ -776,7 +776,7 @@ PHP_METHOD(HttpResponse, getThrottleDelay)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *delay_p, *delay = convert_to_type_ex(IS_DOUBLE, GET_STATIC_PROP(throttleDelay), &delay_p);
                
                RETVAL_ZVAL(delay, 1, 0);
@@ -822,7 +822,7 @@ PHP_METHOD(HttpResponse, getBufferSize)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *size_p, *size = convert_to_type_ex(IS_LONG, GET_STATIC_PROP(bufferSize), &size_p);
                
                RETVAL_ZVAL(size, 1, 0);
@@ -880,7 +880,7 @@ PHP_METHOD(HttpResponse, getData)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *the_data = GET_STATIC_PROP(data);
                
                RETURN_ZVAL(the_data, 1, 0);
@@ -939,7 +939,7 @@ PHP_METHOD(HttpResponse, getStream)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *stream_p;
                
                RETVAL_RESOURCE(Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_STATIC_PROP(stream), &stream_p)));
@@ -998,7 +998,7 @@ PHP_METHOD(HttpResponse, getFile)
 {
        NO_ARGS;
 
-       IF_RETVAL_USED {
+       if (return_value_used) {
                zval *the_file_p, *the_file = convert_to_type_ex(IS_STRING, GET_STATIC_PROP(file), &the_file_p);
                
                RETVAL_ZVAL(the_file, 1, 0);
index 154f778c15fe0f933f7a7c45177d267fa82886d6..b4218bd556c1d87eea2861ec7ab50b487214b5f5 100644 (file)
@@ -96,12 +96,6 @@ typedef int STATUS;
                zend_error(E_NOTICE, "Wrong parameter count for %s()", get_active_function_name(TSRMLS_C)); \
        }
 
-/* check if return value is used */
-#define IF_RETVAL_USED \
-       if (!return_value_used) { \
-               return; \
-       } else
-
 /* CR LF */
 #define HTTP_CRLF "\r\n"