From cd2b462a2742c79256668d4736644e34573c33d9 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Sun, 15 Jan 2017 21:27:05 +0100 Subject: [PATCH] move some var declarations to the top for better grouping --- Zend/zend.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/Zend/zend.c b/Zend/zend.c index 904e2cc68c..db57f395bb 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -35,6 +35,14 @@ #include "zend_smart_string.h" #ifdef ZTS +ZEND_API int compiler_globals_id; +ZEND_API int executor_globals_id; +static HashTable *global_function_table = NULL; +static HashTable *global_class_table = NULL; +static HashTable *global_constants_table = NULL; +static HashTable *global_auto_globals_table = NULL; +static HashTable *global_persistent_list = NULL; +ZEND_TSRMLS_CACHE_DEFINE() # define GLOBAL_FUNCTION_TABLE global_function_table # define GLOBAL_CLASS_TABLE global_class_table # define GLOBAL_CONSTANTS_TABLE global_constants_table @@ -46,6 +54,14 @@ # define GLOBAL_CONSTANTS_TABLE EG(zend_constants) #endif +ZEND_API zend_utility_values zend_uv; + +/* version information */ +static char *zend_version_info; +static uint32_t zend_version_info_length; +#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2017 Zend Technologies\n" +#define PRINT_ZVAL_INDENT 4 + /* true multithread-shared globals */ ZEND_API zend_class_entry *zend_standard_class_def = NULL; ZEND_API size_t (*zend_printf)(const char *format, ...); @@ -140,26 +156,6 @@ ZEND_INI_BEGIN() #endif ZEND_INI_END() - -#ifdef ZTS -ZEND_API int compiler_globals_id; -ZEND_API int executor_globals_id; -static HashTable *global_function_table = NULL; -static HashTable *global_class_table = NULL; -static HashTable *global_constants_table = NULL; -static HashTable *global_auto_globals_table = NULL; -static HashTable *global_persistent_list = NULL; -ZEND_TSRMLS_CACHE_DEFINE() -#endif - -ZEND_API zend_utility_values zend_uv; - -/* version information */ -static char *zend_version_info; -static uint32_t zend_version_info_length; -#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2017 Zend Technologies\n" -#define PRINT_ZVAL_INDENT 4 - ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */ { smart_string buf = {0}; -- 2.50.0