X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_std_defs.h;h=b57f71425f608fe27ccf8fecf0808971465e7cb6;hp=8ca7c730ba7f2c6f5c6b61899a0607d925a41416;hb=39542fc9774df9a27e7643369a7210022cb81b0b;hpb=302498d96ed22a09da4375bd955d07f04b6b36c4 diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 8ca7c73..b57f714 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 | +--------------------------------------------------------------------+ */ @@ -83,12 +83,12 @@ typedef int STATUS; #define RETURN_PROP(n) RETURN_PROP_EX(getThis(), n) #define RETVAL_PROP_EX(this, n) \ { \ - zval *__prop = GET_PROP_EX(this, n); \ + zval *__prop = zend_read_property(THIS_CE, this, ZEND_STRS(#n)-1, 0 TSRMLS_CC); \ RETVAL_ZVAL(__prop, 1, 0); \ } #define RETURN_PROP_EX(this, n) \ { \ - zval *__prop = GET_PROP_EX(this, n); \ + zval *__prop = zend_read_property(THIS_CE, this, ZEND_STRS(#n)-1, 0 TSRMLS_CC); \ RETURN_ZVAL(__prop, 1, 0); \ } @@ -108,7 +108,7 @@ typedef int STATUS; #define HTTP_URL_ARGSEP "&" /* send buffer size */ -#define HTTP_SENDBUF_SIZE 8000 /*40960*/ +#define HTTP_SENDBUF_SIZE 40960 /* CURL buffer size */ #define HTTP_CURLBUF_SIZE 16384 @@ -201,31 +201,6 @@ typedef int STATUS; # define OBJ_PROP(o) (o)->zo.properties # define OBJ_GUARDS(o) (o)->zo.guards -# define DCL_STATIC_PROP(a, t, n, v) zend_declare_property_ ##t(OBJ_PROP_CE, (#n), sizeof(#n)-1, (v), (ZEND_ACC_ ##a | ZEND_ACC_STATIC) TSRMLS_CC) -# define DCL_STATIC_PROP_Z(a, n, v) zend_declare_property(OBJ_PROP_CE, (#n), sizeof(#n)-1, (v), (ZEND_ACC_ ##a | ZEND_ACC_STATIC) TSRMLS_CC) -# define DCL_STATIC_PROP_N(a, n) zend_declare_property_null(OBJ_PROP_CE, (#n), sizeof(#n)-1, (ZEND_ACC_ ##a | ZEND_ACC_STATIC) TSRMLS_CC) -# define GET_STATIC_PROP_EX(ce, n) zend_std_get_static_property(ce, (#n), sizeof(#n)-1, 0 TSRMLS_CC) -# define UPD_STATIC_PROP_EX(ce, t, n, v) zend_update_static_property_ ##t(ce, #n, sizeof(#n)-1, (v) TSRMLS_CC) -# define UPD_STATIC_STRL_EX(ce, n, v, l) zend_update_static_property_stringl(ce, #n, sizeof(#n)-1, (v), (l) TSRMLS_CC) -# define SET_STATIC_PROP_EX(ce, n, v) zend_update_static_property(ce, #n, sizeof(#n)-1, v TSRMLS_CC) -# define GET_STATIC_PROP(n) *GET_STATIC_PROP_EX(OBJ_PROP_CE, n) -# define UPD_STATIC_PROP(t, n, v) UPD_STATIC_PROP_EX(OBJ_PROP_CE, t, n, v) -# define SET_STATIC_PROP(n, v) SET_STATIC_PROP_EX(OBJ_PROP_CE, n, v) -# define UPD_STATIC_STRL(n, v, l) UPD_STATIC_STRL_EX(OBJ_PROP_CE, n, v, l) - -# define DCL_PROP(a, t, n, v) zend_declare_property_ ##t(OBJ_PROP_CE, (#n), sizeof(#n)-1, (v), (ZEND_ACC_ ##a) TSRMLS_CC) -# define DCL_PROP_Z(a, n, v) zend_declare_property(OBJ_PROP_CE, (#n), sizeof(#n)-1, (v), (ZEND_ACC_ ##a) TSRMLS_CC) -# define DCL_PROP_N(a, n) zend_declare_property_null(OBJ_PROP_CE, (#n), sizeof(#n)-1, (ZEND_ACC_ ##a) TSRMLS_CC) -# define UPD_PROP(t, n, v) UPD_PROP_EX(getThis(), t, n, v) -# define UPD_PROP_EX(this, t, n, v) zend_update_property_ ##t(OBJ_PROP_CE, this, (#n), sizeof(#n)-1, (v) TSRMLS_CC) -# define UPD_STRL(n, v, l) zend_update_property_stringl(OBJ_PROP_CE, getThis(), (#n), sizeof(#n)-1, (v), (l) TSRMLS_CC) -# define SET_PROP(n, z) SET_PROP_EX(getThis(), n, z) -# define SET_PROP_EX(this, n, z) zend_update_property(OBJ_PROP_CE, this, (#n), sizeof(#n)-1, (z) TSRMLS_CC) -# define GET_PROP(n) GET_PROP_EX(getThis(), n) -# define GET_PROP_EX(this, n) zend_read_property(OBJ_PROP_CE, this, (#n), sizeof(#n)-1, 0 TSRMLS_CC) - -# define DCL_CONST(t, n, v) zend_declare_class_constant_ ##t(OBJ_PROP_CE, (n), sizeof(n)-1, (v) TSRMLS_CC) - # define ACC_PROP_PRIVATE(ce, flags) ((flags & ZEND_ACC_PRIVATE) && (EG(scope) && ce == EG(scope)) # define ACC_PROP_PROTECTED(ce, flags) ((flags & ZEND_ACC_PROTECTED) && (zend_check_protected(ce, EG(scope)))) # define ACC_PROP_PUBLIC(flags) (flags & ZEND_ACC_PUBLIC) @@ -258,10 +233,6 @@ typedef int STATUS; # define ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default() #endif -#if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10 -# define php_url_parse_ex(u, l) php_url_parse(u) -#endif - #ifndef E_THROW # define E_THROW 0 #endif @@ -381,48 +352,6 @@ typedef int STATUS; # define curl_multi_strerror(dummy) "unknown error" #endif -#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; \ - } -#endif -#ifndef RETVAL_ZVAL -#define RETVAL_ZVAL(zv, copy, dtor) ZVAL_ZVAL(return_value, zv, copy, dtor) -#endif -#ifndef RETURN_ZVAL -#define RETURN_ZVAL(zv, copy, dtor) { RETVAL_ZVAL(zv, copy, dtor); return; } -#endif - #define PHP_MINIT_CALL(func) PHP_MINIT(func)(INIT_FUNC_ARGS_PASSTHRU) #define PHP_RINIT_CALL(func) PHP_RINIT(func)(INIT_FUNC_ARGS_PASSTHRU) #define PHP_MSHUTDOWN_CALL(func) PHP_MSHUTDOWN(func)(SHUTDOWN_FUNC_ARGS_PASSTHRU)