X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_int.h;h=ff220ca74b370c652f2ec462a2e5fce2f6573918;hp=ed46b2317582e8eadcb311af500cfe72a94e4d80;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=23d7e7f276852b4ed1bd2829fcca38c6db854563 diff --git a/php_http_request_int.h b/php_http_request_int.h index ed46b23..ff220ca 100644 --- a/php_http_request_int.h +++ b/php_http_request_int.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2007, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -41,14 +41,12 @@ } #define HTTP_CURL_OPT_STRING_EX(keyname, optname, obdc) \ if (!strcasecmp(key.str, keyname)) { \ - zval *copy_tmp, *copy = http_request_option_cache_ex(request, keyname, strlen(keyname)+1, 0, convert_to_type_ex(IS_STRING, *param, ©_tmp)); \ + zval *copy = http_request_option_cache_ex(request, keyname, strlen(keyname)+1, 0, http_zsep(IS_STRING, *param)); \ if (obdc) { \ HTTP_CHECK_OPEN_BASEDIR(Z_STRVAL_P(copy), return FAILURE); \ } \ HTTP_CURL_OPT(optname, Z_STRVAL_P(copy)); \ - if (copy_tmp) { \ - zval_ptr_dtor(©_tmp); \ - } \ + zval_ptr_dtor(©); \ continue; \ } #define HTTP_CURL_OPT_LONG(OPTION, ldiff) \ @@ -58,12 +56,9 @@ } #define HTTP_CURL_OPT_LONG_EX(keyname, optname) \ if (!strcasecmp(key.str, keyname)) { \ - zval *copy = *param; \ - convert_to_long_ex(©); \ + zval *copy = http_zsep(IS_LONG, *param); \ HTTP_CURL_OPT(optname, Z_LVAL_P(copy)); \ - if (copy != *param) { \ - zval_ptr_dtor(©); \ - } \ + zval_ptr_dtor(©); \ continue; \ }