Lines Matching refs:nKeyLength
100 ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength) in zend_hash_func() argument
102 return zend_inline_hash_func(arKey, nKeyLength); in zend_hash_func()
203 ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pDat… in _zend_hash_add_or_update() argument
211 if (nKeyLength <= 0) { in _zend_hash_add_or_update()
218 h = zend_inline_hash_func(arKey, nKeyLength); in _zend_hash_add_or_update()
223 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in _zend_hash_add_or_update()
224 if (!memcmp(p->arKey, arKey, nKeyLength)) { in _zend_hash_add_or_update()
250 p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent); in _zend_hash_add_or_update()
254 memcpy(p->arKey, arKey, nKeyLength); in _zend_hash_add_or_update()
255 p->nKeyLength = nKeyLength; in _zend_hash_add_or_update()
273 ZEND_API int _zend_hash_quick_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, ulon… in _zend_hash_quick_add_or_update() argument
280 if (nKeyLength == 0) { in _zend_hash_quick_add_or_update()
288 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in _zend_hash_quick_add_or_update()
289 if (!memcmp(p->arKey, arKey, nKeyLength)) { in _zend_hash_quick_add_or_update()
315 p = (Bucket *) pemalloc(sizeof(Bucket) - 1 + nKeyLength, ht->persistent); in _zend_hash_quick_add_or_update()
320 memcpy(p->arKey, arKey, nKeyLength); in _zend_hash_quick_add_or_update()
321 p->nKeyLength = nKeyLength; in _zend_hash_quick_add_or_update()
342 ZEND_API int zend_hash_add_empty_element(HashTable *ht, const char *arKey, uint nKeyLength) in zend_hash_add_empty_element() argument
346 return zend_hash_add(ht, arKey, nKeyLength, &dummy, sizeof(void *), NULL); in zend_hash_add_empty_element()
364 if ((p->nKeyLength == 0) && (p->h == h)) { in _zend_hash_index_update_or_next_insert()
395 p->nKeyLength = 0; /* Numeric indices are marked by making the nKeyLength == 0 */ in _zend_hash_index_update_or_next_insert()
458 ZEND_API int zend_hash_del_key_or_index(HashTable *ht, const char *arKey, uint nKeyLength, ulong h,… in zend_hash_del_key_or_index() argument
466 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_del_key_or_index()
473 && (p->nKeyLength == nKeyLength) in zend_hash_del_key_or_index()
474 && ((p->nKeyLength == 0) /* Numeric index (short circuits the memcmp() check) */ in zend_hash_del_key_or_index()
475 || !memcmp(p->arKey, arKey, nKeyLength))) { /* String index */ in zend_hash_del_key_or_index()
728 hash_key.nKeyLength = p->nKeyLength; in zend_hash_apply_with_arguments()
787 if (p->nKeyLength) { in zend_hash_copy()
788 zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &new_entry); in zend_hash_copy()
814 if (p->nKeyLength>0) { in _zend_hash_merge()
815 …if (_zend_hash_quick_add_or_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t, mode… in _zend_hash_merge()
834 hash_key.nKeyLength = p->nKeyLength; in zend_hash_replace_checker_wrapper()
851 …if (zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t)==SUCCESS && … in zend_hash_merge_ex()
861 ZEND_API ulong zend_get_hash_value(const char *arKey, uint nKeyLength) in zend_get_hash_value() argument
863 return zend_inline_hash_func(arKey, nKeyLength); in zend_get_hash_value()
871 ZEND_API int zend_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData) in zend_hash_find() argument
879 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_find()
884 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in zend_hash_find()
885 if (!memcmp(p->arKey, arKey, nKeyLength)) { in zend_hash_find()
896 ZEND_API int zend_hash_quick_find(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h,… in zend_hash_quick_find() argument
901 if (nKeyLength==0) { in zend_hash_quick_find()
911 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in zend_hash_quick_find()
912 if (!memcmp(p->arKey, arKey, nKeyLength)) { in zend_hash_quick_find()
923 ZEND_API int zend_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength) in zend_hash_exists() argument
931 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_exists()
936 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in zend_hash_exists()
937 if (!memcmp(p->arKey, arKey, nKeyLength)) { in zend_hash_exists()
947 ZEND_API int zend_hash_quick_exists(const HashTable *ht, const char *arKey, uint nKeyLength, ulong … in zend_hash_quick_exists() argument
952 if (nKeyLength==0) { in zend_hash_quick_exists()
962 if ((p->h == h) && (p->nKeyLength == nKeyLength)) { in zend_hash_quick_exists()
963 if (!memcmp(p->arKey, arKey, nKeyLength)) { in zend_hash_quick_exists()
985 if ((p->h == h) && (p->nKeyLength == 0)) { in zend_hash_index_find()
1006 if ((p->h == h) && (p->nKeyLength == 0)) { in zend_hash_index_exists()
1118 if (p->nKeyLength) { in zend_hash_get_current_key_ex()
1120 *str_index = estrndup(p->arKey, p->nKeyLength - 1); in zend_hash_get_current_key_ex()
1125 *str_length = p->nKeyLength; in zend_hash_get_current_key_ex()
1146 if (p->nKeyLength) { in zend_hash_get_current_key_type_ex()
1186 if (!p->nKeyLength && p->h == num_index) { in zend_hash_update_current_key_ex()
1192 if (!q->nKeyLength && q->h == num_index) { in zend_hash_update_current_key_ex()
1200 if (p->nKeyLength == str_length && in zend_hash_update_current_key_ex()
1209 if (q->h == h && q->nKeyLength == str_length && in zend_hash_update_current_key_ex()
1311 if (p->nKeyLength != str_length) { in zend_hash_update_current_key_ex()
1314 q->nKeyLength = str_length; in zend_hash_update_current_key_ex()
1412 p->nKeyLength = 0; in zend_hash_sort()
1454 if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */ in zend_hash_compare()
1462 result = p1->nKeyLength - p2->nKeyLength; in zend_hash_compare()
1468 result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength); in zend_hash_compare()
1477 if (p1->nKeyLength==0) { /* numeric index */ in zend_hash_compare()
1484 if (zend_hash_quick_find(ht2, p1->arKey, p1->nKeyLength, p1->h, &pData2)==FAILURE) { in zend_hash_compare()