Skip to content

Commit cd2b462

Browse files
committed
move some var declarations to the top for better grouping
1 parent 21e5959 commit cd2b462

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

Zend/zend.c

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@
3535
#include "zend_smart_string.h"
3636

3737
#ifdef ZTS
38+
ZEND_API int compiler_globals_id;
39+
ZEND_API int executor_globals_id;
40+
static HashTable *global_function_table = NULL;
41+
static HashTable *global_class_table = NULL;
42+
static HashTable *global_constants_table = NULL;
43+
static HashTable *global_auto_globals_table = NULL;
44+
static HashTable *global_persistent_list = NULL;
45+
ZEND_TSRMLS_CACHE_DEFINE()
3846
# define GLOBAL_FUNCTION_TABLE global_function_table
3947
# define GLOBAL_CLASS_TABLE global_class_table
4048
# define GLOBAL_CONSTANTS_TABLE global_constants_table
@@ -46,6 +54,14 @@
4654
# define GLOBAL_CONSTANTS_TABLE EG(zend_constants)
4755
#endif
4856

57+
ZEND_API zend_utility_values zend_uv;
58+
59+
/* version information */
60+
static char *zend_version_info;
61+
static uint32_t zend_version_info_length;
62+
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2017 Zend Technologies\n"
63+
#define PRINT_ZVAL_INDENT 4
64+
4965
/* true multithread-shared globals */
5066
ZEND_API zend_class_entry *zend_standard_class_def = NULL;
5167
ZEND_API size_t (*zend_printf)(const char *format, ...);
@@ -140,26 +156,6 @@ ZEND_INI_BEGIN()
140156
#endif
141157
ZEND_INI_END()
142158

143-
144-
#ifdef ZTS
145-
ZEND_API int compiler_globals_id;
146-
ZEND_API int executor_globals_id;
147-
static HashTable *global_function_table = NULL;
148-
static HashTable *global_class_table = NULL;
149-
static HashTable *global_constants_table = NULL;
150-
static HashTable *global_auto_globals_table = NULL;
151-
static HashTable *global_persistent_list = NULL;
152-
ZEND_TSRMLS_CACHE_DEFINE()
153-
#endif
154-
155-
ZEND_API zend_utility_values zend_uv;
156-
157-
/* version information */
158-
static char *zend_version_info;
159-
static uint32_t zend_version_info_length;
160-
#define ZEND_CORE_VERSION_INFO "Zend Engine v" ZEND_VERSION ", Copyright (c) 1998-2017 Zend Technologies\n"
161-
#define PRINT_ZVAL_INDENT 4
162-
163159
ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */
164160
{
165161
smart_string buf = {0};

0 commit comments

Comments
 (0)