Skip to content

Commit 2e15d1f

Browse files
committed
HASH_KEY_NON_EXISTANT fix
1 parent d6ece28 commit 2e15d1f

File tree

24 files changed

+47
-47
lines changed

24 files changed

+47
-47
lines changed

Zend/zend_hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index,
11441144
return HASH_KEY_IS_LONG;
11451145
}
11461146
}
1147-
return HASH_KEY_NON_EXISTANT;
1147+
return HASH_KEY_NON_EXISTENT;
11481148
}
11491149

11501150
ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos) {
@@ -1181,7 +1181,7 @@ ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
11811181
return HASH_KEY_IS_LONG;
11821182
}
11831183
}
1184-
return HASH_KEY_NON_EXISTANT;
1184+
return HASH_KEY_NON_EXISTENT;
11851185
}
11861186

11871187

Zend/zend_hash.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#define HASH_KEY_IS_STRING 1
2929
#define HASH_KEY_IS_LONG 2
30-
#define HASH_KEY_NON_EXISTANT 3
30+
#define HASH_KEY_NON_EXISTENT 3
3131

3232
#define HASH_UPDATE (1<<0)
3333
#define HASH_ADD (1<<1)
@@ -172,7 +172,7 @@ ZEND_API ulong zend_hash_next_free_element(const HashTable *ht);
172172

173173
/* traversing */
174174
#define zend_hash_has_more_elements_ex(ht, pos) \
175-
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTANT ? FAILURE : SUCCESS)
175+
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
176176
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
177177
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
178178
ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);

Zend/zend_vm_def.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4221,7 +4221,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
42214221
zend_uchar key_type;
42224222

42234223
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
4224-
if (key_type != HASH_KEY_NON_EXISTANT &&
4224+
if (key_type != HASH_KEY_NON_EXISTENT &&
42254225
(key_type == HASH_KEY_IS_LONG ||
42264226
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
42274227
break;

Zend/zend_vm_execute.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2906,7 +2906,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
29062906
zend_uchar key_type;
29072907

29082908
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
2909-
if (key_type != HASH_KEY_NON_EXISTANT &&
2909+
if (key_type != HASH_KEY_NON_EXISTENT &&
29102910
(key_type == HASH_KEY_IS_LONG ||
29112911
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
29122912
break;
@@ -8214,7 +8214,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
82148214
zend_uchar key_type;
82158215

82168216
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
8217-
if (key_type != HASH_KEY_NON_EXISTANT &&
8217+
if (key_type != HASH_KEY_NON_EXISTENT &&
82188218
(key_type == HASH_KEY_IS_LONG ||
82198219
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
82208220
break;
@@ -13544,7 +13544,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
1354413544
zend_uchar key_type;
1354513545

1354613546
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
13547-
if (key_type != HASH_KEY_NON_EXISTANT &&
13547+
if (key_type != HASH_KEY_NON_EXISTENT &&
1354813548
(key_type == HASH_KEY_IS_LONG ||
1354913549
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
1355013550
break;
@@ -31167,7 +31167,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
3116731167
zend_uchar key_type;
3116831168

3116931169
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
31170-
if (key_type != HASH_KEY_NON_EXISTANT &&
31170+
if (key_type != HASH_KEY_NON_EXISTENT &&
3117131171
(key_type == HASH_KEY_IS_LONG ||
3117231172
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
3117331173
break;

ext/com_dotnet/com_variant.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
5353

5454
if (HASH_KEY_IS_STRING == keytype) {
5555
goto bogus;
56-
} else if (HASH_KEY_NON_EXISTANT == keytype) {
56+
} else if (HASH_KEY_NON_EXISTENT == keytype) {
5757
break;
5858
}
5959
if (intindex > max_index) {

ext/com_dotnet/com_wrapper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
467467
/* properties */
468468
if (Z_OBJPROP_P(disp->object)) {
469469
zend_hash_internal_pointer_reset_ex(Z_OBJPROP_P(disp->object), &pos);
470-
while (HASH_KEY_NON_EXISTANT != (keytype =
470+
while (HASH_KEY_NON_EXISTENT != (keytype =
471471
zend_hash_get_current_key_ex(Z_OBJPROP_P(disp->object), &name,
472472
&namelen, &pid, 0, &pos))) {
473473
char namebuf[32];
@@ -498,7 +498,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
498498
/* functions */
499499
if (Z_OBJCE_P(disp->object)) {
500500
zend_hash_internal_pointer_reset_ex(&Z_OBJCE_P(disp->object)->function_table, &pos);
501-
while (HASH_KEY_NON_EXISTANT != (keytype =
501+
while (HASH_KEY_NON_EXISTENT != (keytype =
502502
zend_hash_get_current_key_ex(&Z_OBJCE_P(disp->object)->function_table,
503503
&name, &namelen, &pid, 0, &pos))) {
504504

@@ -598,7 +598,7 @@ PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *si
598598
zend_hash_init(disp->name_to_dispid, 0, NULL, ZVAL_PTR_DTOR, 0);
599599

600600
zend_hash_internal_pointer_reset_ex(id_to_name, &pos);
601-
while (HASH_KEY_NON_EXISTANT != (keytype =
601+
while (HASH_KEY_NON_EXISTENT != (keytype =
602602
zend_hash_get_current_key_ex(id_to_name, &name, &namelen, &pid, 0, &pos))) {
603603

604604
if (keytype == HASH_KEY_IS_LONG) {

ext/hash/hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ PHP_FUNCTION(hash_algos)
597597

598598
array_init(return_value);
599599
for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos);
600-
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, &str_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT;
600+
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, &str_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTENT;
601601
zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) {
602602
add_next_index_stringl(return_value, str, str_len-1, 1);
603603
}
@@ -1042,7 +1042,7 @@ PHP_MINFO_FUNCTION(hash)
10421042
long type;
10431043

10441044
for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos);
1045-
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT;
1045+
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTENT;
10461046
zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) {
10471047
s += slprintf(s, e - s, "%s ", str);
10481048
}

ext/intl/collator/collator_convert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* stat
139139

140140
zend_hash_internal_pointer_reset( hash );
141141
while( ( hashKeyType = zend_hash_get_current_key( hash, &hashKey, &hashIndex, 0 ) )
142-
!= HASH_KEY_NON_EXISTANT )
142+
!= HASH_KEY_NON_EXISTENT )
143143
{
144144
/* Convert current hash item from UTF-8 to UTF-16LE. */
145145
collator_convert_hash_item_from_utf8_to_utf16(
@@ -164,7 +164,7 @@ void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* stat
164164

165165
zend_hash_internal_pointer_reset( hash );
166166
while( ( hashKeyType = zend_hash_get_current_key( hash, &hashKey, &hashIndex, 0 ) )
167-
!= HASH_KEY_NON_EXISTANT )
167+
!= HASH_KEY_NON_EXISTENT )
168168
{
169169
/* Convert current hash item from UTF-16LE to UTF-8. */
170170
collator_convert_hash_item_from_utf16_to_utf8(

ext/json/json.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */
185185
idx = 0;
186186
for (;; zend_hash_move_forward_ex(myht, &pos)) {
187187
i = zend_hash_get_current_key_ex(myht, &key, &key_len, &index, 0, &pos);
188-
if (i == HASH_KEY_NON_EXISTANT) {
188+
if (i == HASH_KEY_NON_EXISTENT) {
189189
break;
190190
}
191191

@@ -271,7 +271,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
271271
zend_hash_internal_pointer_reset_ex(myht, &pos);
272272
for (;; zend_hash_move_forward_ex(myht, &pos)) {
273273
i = zend_hash_get_current_key_ex(myht, &key, &key_len, &index, 0, &pos);
274-
if (i == HASH_KEY_NON_EXISTANT)
274+
if (i == HASH_KEY_NON_EXISTENT)
275275
break;
276276

277277
if (zend_hash_get_current_data_ex(myht, (void **) &data, &pos) == SUCCESS) {

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ PHP_FUNCTION(pcntl_exec)
795795
snprintf(key, 100, "%ld", key_num);
796796
key_length = strlen(key);
797797
break;
798-
case HASH_KEY_NON_EXISTANT:
798+
case HASH_KEY_NON_EXISTENT:
799799
pair--;
800800
continue;
801801
}

0 commit comments

Comments
 (0)