X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_std_defs.h;h=dbc6473301752a84c88f3d5b1e348de9d369f7bd;hb=8fa713be4960d51958523429ee0e7dfca6d017fb;hp=558a8ec8d5b53a6fe0e2c02e28d29597ad08fb76;hpb=0e41acb9661b95484c212e349f83e34eb3fe84a2;p=m6w6%2Fext-http diff --git a/php_http_std_defs.h b/php_http_std_defs.h index 558a8ec..dbc6473 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -96,12 +96,10 @@ typedef int STATUS; #define HTTP_DEFAULT_CACHECONTROL "private, must-revalidate, max-age=0" /* max URL length */ -#define HTTP_URL_MAXLEN 2048 -#define HTTP_URI_MAXLEN HTTP_URL_MAXLEN +#define HTTP_URL_MAXLEN 4096 /* def URL arg separator */ #define HTTP_URL_ARGSEP "&" -#define HTTP_URI_ARGSEP HTTP_URL_ARGSEP /* send buffer size */ #define HTTP_SENDBUF_SIZE 40960 @@ -141,6 +139,12 @@ typedef int STATUS; zend_hash_get_current_key_ex(hash, &strkey, NULL, &numkey, 0, &pos) != HASH_KEY_NON_EXISTANT; \ zend_hash_move_forward_ex(hash, &pos)) \ +#define FOREACH_KEYLEN(pos, array, strkey, keylen, numkey) FOREACH_HASH_KEYLEN(pos, Z_ARRVAL_P(array), strkey, keylen, numkey) +#define FOREACH_HASH_KEYLEN(pos, hash, strkey, keylen, numkey) \ + 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; \ + zend_hash_move_forward_ex(hash, &pos)) \ + #define FOREACH_KEYVAL(pos, array, strkey, numkey, val) FOREACH_HASH_KEYVAL(pos, Z_ARRVAL_P(array), strkey, numkey, val) #define FOREACH_HASH_KEYVAL(pos, hash, strkey, numkey, val) \ for ( zend_hash_internal_pointer_reset_ex(hash, &pos); \ @@ -204,7 +208,6 @@ typedef int STATUS; name## _ce = zend_register_internal_class_ex(&ce, parent, NULL TSRMLS_CC); \ name## _ce->ce_flags |= flags; \ memcpy(& name## _handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \ - zend_hash_init(& name## _ce->constants_table, 0, NULL, ZVAL_INTERNAL_PTR_DTOR, 1); \ name## _declare_default_properties(); \ } @@ -385,10 +388,18 @@ typedef int STATUS; ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_2, 0) \ ZEND_ARG_PASS_INFO(0) \ ZEND_ARG_PASS_INFO(1) \ + ZEND_END_ARG_INFO(); \ +\ + static \ + ZEND_BEGIN_ARG_INFO(http_arg_pass_ref_3, 0) \ + ZEND_ARG_PASS_INFO(0) \ + ZEND_ARG_PASS_INFO(0) \ + ZEND_ARG_PASS_INFO(1) \ ZEND_END_ARG_INFO(); # else # define HTTP_DECLARE_ARG_PASS_INFO() \ - static unsigned char http_arg_pass_ref_2[] = {2, BYREF_NONE, BYREF_FORCE}; + static unsigned char http_arg_pass_ref_2[] = {2, BYREF_NONE, BYREF_FORCE};\ + static unsigned char http_arg_pass_ref_3[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE}; # endif /* ZEND_ENGINE_2 */ #endif /* HTTP_HAVE_CURL */