X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_std_defs.h;h=2e575a38d86bc6f9c339c049f7fa44e976050dbe;hp=51b9a5165d5339b86e6f76f0939ab87450dddf84;hb=1dbcba16c7ba9c580b12e9fdce49b6b2a190233b;hpb=d046681a7b929ef813849cfe38fbceb333f0b0eb diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 51b9a51..2e575a3 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -133,6 +133,12 @@ typedef int STATUS; "ACL, " \ /* END */ +#ifdef ZEND_ENGINE_2 +# include "ext/standard/file.h" +# define HTTP_DEFAULT_STREAM_CONTEXT FG(default_context) +#else +# define HTTP_DEFAULT_STREAM_CONTEXT NULL +#endif #define HTTP_PHP_INI_ENTRY(entry, default, scope, updater, global) \ STD_PHP_INI_ENTRY(entry, default, scope, updater, global, zend_http_globals, http_globals) @@ -165,7 +171,7 @@ typedef int STATUS; zend_hash_get_current_data_ex(hash, (void **) &val, &pos) == SUCCESS; \ zend_hash_move_forward_ex(hash, &pos)) -#define FOREACH_KEYLENVAL(pos, array, strkey, keylen, numkey, val) FOREACH_HASH_KEYVAL(pos, Z_ARRVAL_P(array), strkey, keylen, numkey, val) +#define FOREACH_KEYLENVAL(pos, array, strkey, keylen, numkey, val) FOREACH_HASH_KEYLENVAL(pos, Z_ARRVAL_P(array), strkey, keylen, numkey, val) #define FOREACH_HASH_KEYLENVAL(pos, hash, strkey, keylen, numkey, val) \ for ( zend_hash_internal_pointer_reset_ex(hash, &pos); \ zend_hash_get_current_key_ex(hash, &strkey, &keylen, &numkey, 0, &pos) != HASH_KEY_NON_EXISTANT && \ @@ -288,9 +294,9 @@ typedef int STATUS; #endif #ifdef ZEND_ENGINE_2 # define HE_THROW E_THROW TSRMLS_CC -# define HE_NOTICE (HTTP_G(only_exceptions) ? E_THROW : E_NOTICE) TSRMLS_CC -# define HE_WARNING (HTTP_G(only_exceptions) ? E_THROW : E_WARNING) TSRMLS_CC -# define HE_ERROR (HTTP_G(only_exceptions) ? E_THROW : E_ERROR) TSRMLS_CC +# define HE_NOTICE (HTTP_G->only_exceptions ? E_THROW : E_NOTICE) TSRMLS_CC +# define HE_WARNING (HTTP_G->only_exceptions ? E_THROW : E_WARNING) TSRMLS_CC +# define HE_ERROR (HTTP_G->only_exceptions ? E_THROW : E_ERROR) TSRMLS_CC #else # define HE_THROW E_WARNING TSRMLS_CC # define HE_NOTICE E_NOTICE TSRMLS_CC @@ -310,6 +316,7 @@ typedef int STATUS; #define HTTP_E_SOCKET 10L #define HTTP_E_RESPONSE 11L #define HTTP_E_URL 12L +#define HTTP_E_QUERYSTRING 13L #ifdef ZEND_ENGINE_2 # define HTTP_BEGIN_ARGS_EX(class, method, ret_ref, req_args) static ZEND_BEGIN_ARG_INFO_EX(args_for_ ##class## _ ##method , 0, ret_ref, req_args)