/* }}} */
/* {{{ array_join */
-int apply_array_append_func(void *pDest, int num_args, va_list args, zend_hash_key *hash_key)
+int apply_array_append_func(void *pDest HTTP_ZAPI_HASH_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
int flags;
char *key = NULL;
return ZEND_HASH_APPLY_KEEP;
}
-int apply_array_merge_func(void *pDest, int num_args, va_list args, zend_hash_key *hash_key)
+int apply_array_merge_func(void *pDest HTTP_ZAPI_HASH_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key)
{
int flags;
char *key = NULL;
}
} else if (opts) {
if (prettify_keys) {
- zend_hash_apply_with_arguments(Z_ARRVAL_P(opts), apply_pretty_key, 0, NULL);
+ zend_hash_apply_with_arguments(Z_ARRVAL_P(opts) HTTP_ZAPI_HASH_TSRMLS_CC, apply_pretty_key, 0, NULL);
}
ZVAL_ADDREF(opts);
add_assoc_zval_ex(new_opts, key, len, opts);
#include "php_version.h"
#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3)
+# define HTTP_ZAPI_HASH_TSRMLS_CC TSRMLS_CC
+# define HTTP_ZAPI_HASH_TSRMLS_DC TSRMLS_DC
# define HTTP_ZAPI_CONST_CAST(t) (const t)
# define GLOBAL_ERROR_HANDLING EG(error_handling)
# define GLOBAL_EXCEPTION_CLASS EG(exception_class)
# define IS_CALLABLE(cb_zv, flags, cb_sp) zend_is_callable((cb_zv), (flags), (cb_sp) TSRMLS_CC)
#else
+# define HTTP_ZAPI_HASH_TSRMLS_CC
+# define HTTP_ZAPI_HASH_TSRMLS_DC
# define HTTP_ZAPI_CONST_CAST(t) (t)
# define GLOBAL_ERROR_HANDLING PG(error_handling)
# define GLOBAL_EXCEPTION_CLASS PG(exception_class)
#define array_copy(src, dst) zend_hash_copy(dst, src, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *))
#define ARRAY_JOIN_STRONLY 1
#define ARRAY_JOIN_PRETTIFY 2
-#define array_join(src, dst, append, flags) zend_hash_apply_with_arguments(src, (append)?apply_array_append_func:apply_array_merge_func, 2, dst, (int)flags)
+#define array_join(src, dst, append, flags) zend_hash_apply_with_arguments(src HTTP_ZAPI_HASH_TSRMLS_CC, (append)?apply_array_append_func:apply_array_merge_func, 2, dst, (int)flags)
-extern int apply_array_append_func(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
-extern int apply_array_merge_func(void *pDest, int num_args, va_list args, zend_hash_key *hash_key);
+extern int apply_array_append_func(void *pDest HTTP_ZAPI_HASH_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key);
+extern int apply_array_merge_func(void *pDest HTTP_ZAPI_HASH_TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key);
#endif