2626#include "zend_string.h"
2727#include "zend_sort.h"
2828
29- #define HASH_KEY_IS_STRING 1
30- #define HASH_KEY_IS_LONG 2
31- #define HASH_KEY_NON_EXISTENT 3
29+ typedef enum {
30+ HASH_KEY_IS_STRING = 1 ,
31+ HASH_KEY_IS_LONG ,
32+ HASH_KEY_NON_EXISTENT
33+ } zend_hash_key_type ;
3234
3335#define HASH_UPDATE (1<<0) /* Create new entry, or update the existing one. */
3436#define HASH_ADD (1<<1) /* Create new entry, or fail if it exists. */
@@ -251,9 +253,9 @@ ZEND_API HashPosition ZEND_FASTCALL zend_hash_get_current_pos(const HashTable *h
251253
252254ZEND_API zend_result ZEND_FASTCALL zend_hash_move_forward_ex (const HashTable * ht , HashPosition * pos );
253255ZEND_API zend_result ZEND_FASTCALL zend_hash_move_backwards_ex (const HashTable * ht , HashPosition * pos );
254- ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_ex (const HashTable * ht , zend_string * * str_index , zend_ulong * num_index , const HashPosition * pos );
256+ ZEND_API zend_hash_key_type ZEND_FASTCALL zend_hash_get_current_key_ex (const HashTable * ht , zend_string * * str_index , zend_ulong * num_index , const HashPosition * pos );
255257ZEND_API void ZEND_FASTCALL zend_hash_get_current_key_zval_ex (const HashTable * ht , zval * key , const HashPosition * pos );
256- ZEND_API int ZEND_FASTCALL zend_hash_get_current_key_type_ex (const HashTable * ht , const HashPosition * pos );
258+ ZEND_API zend_hash_key_type ZEND_FASTCALL zend_hash_get_current_key_type_ex (const HashTable * ht , const HashPosition * pos );
257259ZEND_API zval * ZEND_FASTCALL zend_hash_get_current_data_ex (const HashTable * ht , const HashPosition * pos );
258260ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_reset_ex (const HashTable * ht , HashPosition * pos );
259261ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex (const HashTable * ht , HashPosition * pos );
@@ -270,13 +272,13 @@ static zend_always_inline zend_result zend_hash_move_forward(HashTable *ht) {
270272static zend_always_inline zend_result zend_hash_move_backwards (HashTable * ht ) {
271273 return zend_hash_move_backwards_ex (ht , & ht -> nInternalPointer );
272274}
273- static zend_always_inline int zend_hash_get_current_key (const HashTable * ht , zend_string * * str_index , zend_ulong * num_index ) {
275+ static zend_always_inline zend_hash_key_type zend_hash_get_current_key (const HashTable * ht , zend_string * * str_index , zend_ulong * num_index ) {
274276 return zend_hash_get_current_key_ex (ht , str_index , num_index , & ht -> nInternalPointer );
275277}
276278static zend_always_inline void zend_hash_get_current_key_zval (const HashTable * ht , zval * key ) {
277279 zend_hash_get_current_key_zval_ex (ht , key , & ht -> nInternalPointer );
278280}
279- static zend_always_inline int zend_hash_get_current_key_type (const HashTable * ht ) {
281+ static zend_always_inline zend_hash_key_type zend_hash_get_current_key_type (const HashTable * ht ) {
280282 return zend_hash_get_current_key_type_ex (ht , & ht -> nInternalPointer );
281283}
282284static zend_always_inline zval * zend_hash_get_current_data (const HashTable * ht ) {
0 commit comments