From dbaf6c5c653d932745e7c2592415cccd29ade73b Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Sat, 11 Dec 1999 22:42:01 +0000 Subject: Added array globals in preparation for multisort() changes. --- ext/standard/php_array.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'ext/standard/php_array.h') diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index 46ec921fc8..2fee1a3589 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -36,7 +36,7 @@ extern zend_module_entry array_module_entry; #define array_module_ptr &array_module_entry PHP_MINIT_FUNCTION(array); -PHP_RINIT_FUNCTION(array); +PHP_MSHUTDOWN_FUNCTION(array); PHP_FUNCTION(ksort); PHP_FUNCTION(krsort); @@ -80,5 +80,27 @@ PHP_FUNCTION(array_flip); HashTable* _phpi_splice(HashTable *, int, int, zval ***, int, HashTable **); int multisort_compare(const void *a, const void *b); +typedef struct { + int *multisort_flags; +} php_array_globals; + +#ifdef ZTS +#define ARRAYLS_D php_array_globals *array_globals +#define ARRAYLS_DC , ARRAYLS_D +#define ARRAYLS_C array_globals +#define ARRAYLS_CC , ARRAYLS_C +#define ARRAYG(v) (array_globals->v) +#define ARRAYLS_FETCH() php_array_globals *array_globals = ts_resource(array_globals_id) +extern int array_globals_id; +#else +#define ARRAYLS_D +#define ARRAYLS_DC +#define ARRAYLS_C +#define ARRAYLS_CC +#define ARRAYG(v) (array_globals.v) +#define ARRAYLS_FETCH() +extern php_array_globals array_globals; +#endif + #define phpext_array_ptr array_module_ptr #endif /* _PHP_ARRAY_H */ -- cgit v1.2.1