[php-src] master: Zend: move zend_empty_array to BEGIN_EXTERN_C section

From: Date: Fri, 16 Oct 2026 21:17:52 +0000
Subject: [php-src] master: Zend: move zend_empty_array to BEGIN_EXTERN_C section
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142366@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-10-16T22:17:42+01:00 Commit: https://github.com/php/php-src/commit/070ce2f9d70d27fcccf8025e2fac974ed01d1871 Raw diff: https://github.com/php/php-src/commit/070ce2f9d70d27fcccf8025e2fac974ed01d1871.diff Zend: move zend_empty_array to BEGIN_EXTERN_C section Changed paths: M Zend/zend_hash.h Diff: diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index c7cdbe95866e..3bd71bab8dce 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -84,15 +84,6 @@ typedef enum { #define HT_DEC_ITERATORS_COUNT(ht) \ HT_SET_ITERATORS_COUNT(ht, HT_ITERATORS_COUNT(ht) - 1) -extern ZEND_API const HashTable zend_empty_array; - -#define ZVAL_EMPTY_ARRAY(z) do { \ - zval *__z = (z); \ - Z_ARR_P(__z) = (zend_array*)&zend_empty_array; \ - Z_TYPE_INFO_P(__z) = IS_ARRAY; \ - } while (0) - - typedef struct _zend_hash_key { zend_ulong h; zend_string *key; @@ -101,6 +92,13 @@ typedef struct _zend_hash_key { typedef bool (*merge_checker_func_t)(HashTable *target_ht, zval *source_data, zend_hash_key *hash_key, void *pParam); BEGIN_EXTERN_C() +extern ZEND_API const HashTable zend_empty_array; + +#define ZVAL_EMPTY_ARRAY(z) do { \ + zval *__z = (z); \ + Z_ARR_P(__z) = (zend_array*)&zend_empty_array; \ + Z_TYPE_INFO_P(__z) = IS_ARRAY; \ + } while (0) /* startup/shutdown */ ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, bool persistent);

« previous php.cvs (#142366) next »