From: Andrei Zmievski Date: Tue, 7 Feb 2006 17:54:24 +0000 (+0000) Subject: Move array globals declarations back to the header file. X-Git-Tag: php-5.1.3RC1~130 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7deff63e3c533cc00da67ef43996c44476d2cb17;p=php Move array globals declarations back to the header file. --- diff --git a/ext/standard/array.c b/ext/standard/array.c index b134524877..2e9b025cf2 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -92,20 +92,7 @@ #define DOUBLE_DRIFT_FIX 0.000000000000001 -ZEND_BEGIN_MODULE_GLOBALS(array) - int *multisort_flags[2]; - int (*compare_func)(zval *result, zval *op1, zval *op2 TSRMLS_DC); -ZEND_END_MODULE_GLOBALS(array) - -ZEND_DECLARE_MODULE_GLOBALS(array) - -#ifdef ZTS -#define ARRAYG(v) TSRMG(array_globals_id, zend_array_globals *, v) -#else -#define ARRAYG(v) (array_globals.v) -#endif - -/* {{{ php_extname_init_globals +/* {{{ php_array_init_globals */ static void php_array_init_globals(zend_array_globals *array_globals) { diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index 649b310a32..6d80348871 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -103,4 +103,17 @@ HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **); PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS_DC); int multisort_compare(const void *a, const void *b TSRMLS_DC); +ZEND_BEGIN_MODULE_GLOBALS(array) + int *multisort_flags[2]; + int (*compare_func)(zval *result, zval *op1, zval *op2 TSRMLS_DC); +ZEND_END_MODULE_GLOBALS(array) + +ZEND_DECLARE_MODULE_GLOBALS(array) + +#ifdef ZTS +#define ARRAYG(v) TSRMG(array_globals_id, zend_array_globals *, v) +#else +#define ARRAYG(v) (array_globals.v) +#endif + #endif /* PHP_ARRAY_H */