Skip to content

Commit 070ce2f

Browse files
committed
Zend: move zend_empty_array to BEGIN_EXTERN_C section
1 parent 6e4082b commit 070ce2f

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

‎Zend/zend_hash.h‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,6 @@ typedef enum {
8484
#define HT_DEC_ITERATORS_COUNT(ht) \
8585
HT_SET_ITERATORS_COUNT(ht, HT_ITERATORS_COUNT(ht) - 1)
8686

87-
extern ZEND_API const HashTable zend_empty_array;
88-
89-
#define ZVAL_EMPTY_ARRAY(z) do { \
90-
zval *__z = (z); \
91-
Z_ARR_P(__z) = (zend_array*)&zend_empty_array; \
92-
Z_TYPE_INFO_P(__z) = IS_ARRAY; \
93-
} while (0)
94-
95-
9687
typedef struct _zend_hash_key {
9788
zend_ulong h;
9889
zend_string *key;
@@ -101,6 +92,13 @@ typedef struct _zend_hash_key {
10192
typedef bool (*merge_checker_func_t)(HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam);
10293

10394
BEGIN_EXTERN_C()
95+
extern ZEND_API const HashTable zend_empty_array;
96+
97+
#define ZVAL_EMPTY_ARRAY(z) do { \
98+
zval *__z = (z); \
99+
Z_ARR_P(__z) = (zend_array*)&zend_empty_array; \
100+
Z_TYPE_INFO_P(__z) = IS_ARRAY; \
101+
} while (0)
104102

105103
/* startup/shutdown */
106104
ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent);

0 commit comments

Comments
 (0)