X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_std_defs.h;h=bf16328afc370d3aecf3d8ee8e5cd37f48e2553d;hp=0a80180d210dde01166ff35ae1ca03af3933354b;hb=22e85919b89570a1848bcc8f41949a592ae20b48;hpb=6991b7214b3647780be00917c069db46d46b0484 diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 0a80180..bf16328 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2007, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -93,10 +93,7 @@ typedef int STATUS; } /* function accepts no args */ -#define NO_ARGS \ - if (ZEND_NUM_ARGS()) { \ - zend_error(E_NOTICE, "Wrong parameter count for %s()", get_active_function_name(TSRMLS_C)); \ - } +#define NO_ARGS zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, ""); /* CR LF */ #define HTTP_CRLF "\r\n" @@ -234,7 +231,6 @@ typedef int STATUS; # define ACC_PROP_PUBLIC(flags) (flags & ZEND_ACC_PUBLIC) # define ACC_PROP(ce, flags) (ACC_PROP_PUBLIC(flags) || ACC_PROP_PRIVATE(ce, flags) || ACC_PROP_PROTECTED(ce, flags)) -# define SET_EH_THROW() SET_EH_THROW_EX(zend_exception_get_default()) # define SET_EH_THROW_HTTP() SET_EH_THROW_EX(http_exception_get_default()) # define SET_EH_THROW_EX(ex) php_set_error_handling(EH_THROW, ex TSRMLS_CC) # define SET_EH_NORMAL() php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC) @@ -371,46 +367,14 @@ typedef int STATUS; #endif /* HTTP_HAVE_CURL */ -#ifndef TSRMLS_FETCH_FROM_CTX -# ifdef ZTS -# define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx -# else -# define TSRMLS_FETCH_FROM_CTX(ctx) -# endif -#endif - -#ifndef TSRMLS_SET_CTX -# ifdef ZTS -# define TSRMLS_SET_CTX(ctx) ctx = (void ***) tsrm_ls -# else -# define TSRMLS_SET_CTX(ctx) -# endif -#endif - -#ifndef ZVAL_ZVAL -#define ZVAL_ZVAL(z, zv, copy, dtor) { \ - int is_ref, refcount; \ - is_ref = (z)->is_ref; \ - refcount = (z)->refcount; \ - *(z) = *(zv); \ - if (copy) { \ - zval_copy_ctor(z); \ - } \ - if (dtor) { \ - if (!copy) { \ - ZVAL_NULL(zv); \ - } \ - zval_ptr_dtor(&zv); \ - } \ - (z)->is_ref = is_ref; \ - (z)->refcount = refcount; \ - } +#ifndef HAVE_CURL_SHARE_STRERROR +# define curl_share_strerror(dummy) "unknown error" #endif -#ifndef RETVAL_ZVAL -#define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor) +#ifndef HAVE_CURL_EASY_STRERROR +# define curl_easy_strerror(dummy) "unknown error" #endif -#ifndef RETURN_ZVAL -#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; } +#ifndef HAVE_CURL_MULTI_STRERROR +# define curl_multi_strerror(dummy) "unknown error" #endif #define PHP_MINIT_CALL(func) PHP_MINIT(func)(INIT_FUNC_ARGS_PASSTHRU)