summaryrefslogtreecommitdiff
path: root/ext/standard/php_array.h
diff options
context:
space:
mode:
authorAndrei Zmievski <andrei@php.net>1999-12-11 22:42:01 +0000
committerAndrei Zmievski <andrei@php.net>1999-12-11 22:42:01 +0000
commitdbaf6c5c653d932745e7c2592415cccd29ade73b (patch)
tree6c8530e741853b11d3935936d648412b70ca9e86 /ext/standard/php_array.h
parent0c779c51c9ee0362106c04cdccb91a3bac478e70 (diff)
downloadphp-git-dbaf6c5c653d932745e7c2592415cccd29ade73b.tar.gz
Added array globals in preparation for multisort() changes.
Diffstat (limited to 'ext/standard/php_array.h')
-rw-r--r--ext/standard/php_array.h24
1 files changed, 23 insertions, 1 deletions
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 */