Lines Matching refs:nKeyLength

107 ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength)  in zend_hash_func()  argument
109 return zend_inline_hash_func(arKey, nKeyLength); in zend_hash_func()
242 ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pDat… in _zend_hash_add_or_update() argument
253 ZEND_ASSERT(nKeyLength != 0); in _zend_hash_add_or_update()
257 h = zend_inline_hash_func(arKey, nKeyLength); in _zend_hash_add_or_update()
263 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in _zend_hash_add_or_update()
286 p = (Bucket *) pemalloc(sizeof(Bucket) + nKeyLength, ht->persistent); in _zend_hash_add_or_update()
288 memcpy((char*)p->arKey, arKey, nKeyLength); in _zend_hash_add_or_update()
290 p->nKeyLength = nKeyLength; in _zend_hash_add_or_update()
308 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
318 ZEND_ASSERT(nKeyLength != 0); in _zend_hash_quick_add_or_update()
326 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in _zend_hash_quick_add_or_update()
349 p = (Bucket *) pemalloc(sizeof(Bucket) + nKeyLength, ht->persistent); in _zend_hash_quick_add_or_update()
351 memcpy((char*)p->arKey, arKey, nKeyLength); in _zend_hash_quick_add_or_update()
354 p->nKeyLength = nKeyLength; in _zend_hash_quick_add_or_update()
375 ZEND_API int zend_hash_add_empty_element(HashTable *ht, const char *arKey, uint nKeyLength) in zend_hash_add_empty_element() argument
379 return zend_hash_add(ht, arKey, nKeyLength, &dummy, sizeof(void *), NULL); in zend_hash_add_empty_element()
401 if ((p->nKeyLength == 0) && (p->h == h)) { in _zend_hash_index_update_or_next_insert()
421 p->nKeyLength = 0; /* Numeric indices are marked by making the nKeyLength == 0 */ in _zend_hash_index_update_or_next_insert()
496 if (!only_integer_keys || p->nKeyLength == 0) { in zend_hash_reindex()
498 p->nKeyLength = 0; in zend_hash_reindex()
508 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
516 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_del_key_or_index()
523 && (p->nKeyLength == nKeyLength) in zend_hash_del_key_or_index()
524 && ((p->nKeyLength == 0) /* Numeric index (short circuits the memcmp() check) */ in zend_hash_del_key_or_index()
525 || !memcmp(p->arKey, arKey, nKeyLength))) { /* String index */ in zend_hash_del_key_or_index()
699 hash_key.nKeyLength = p->nKeyLength; in zend_hash_apply_with_arguments()
760 if (p->nKeyLength) { in zend_hash_copy()
761 zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &new_entry); in zend_hash_copy()
787 if (p->nKeyLength>0) { in _zend_hash_merge()
788 …if (_zend_hash_quick_add_or_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t, mode… in _zend_hash_merge()
807 hash_key.nKeyLength = p->nKeyLength; in zend_hash_replace_checker_wrapper()
824 …if (zend_hash_quick_update(target, p->arKey, p->nKeyLength, p->h, p->pData, size, &t)==SUCCESS && … in zend_hash_merge_ex()
838 ZEND_API int zend_hash_find(const HashTable *ht, const char *arKey, uint nKeyLength, void **pData) in zend_hash_find() argument
846 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_find()
852 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in zend_hash_find()
862 ZEND_API int zend_hash_quick_find(const HashTable *ht, const char *arKey, uint nKeyLength, ulong h,… in zend_hash_quick_find() argument
867 ZEND_ASSERT(nKeyLength != 0); in zend_hash_quick_find()
876 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in zend_hash_quick_find()
886 ZEND_API int zend_hash_exists(const HashTable *ht, const char *arKey, uint nKeyLength) in zend_hash_exists() argument
894 h = zend_inline_hash_func(arKey, nKeyLength); in zend_hash_exists()
900 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in zend_hash_exists()
909 ZEND_API int zend_hash_quick_exists(const HashTable *ht, const char *arKey, uint nKeyLength, ulong … in zend_hash_quick_exists() argument
914 ZEND_ASSERT(nKeyLength != 0); in zend_hash_quick_exists()
923 ((p->h == h) && (p->nKeyLength == nKeyLength) && !memcmp(p->arKey, arKey, nKeyLength))) { in zend_hash_quick_exists()
944 if ((p->h == h) && (p->nKeyLength == 0)) { in zend_hash_index_find()
965 if ((p->h == h) && (p->nKeyLength == 0)) { in zend_hash_index_exists()
1077 if (p->nKeyLength) { in zend_hash_get_current_key_ex()
1079 *str_index = estrndup(p->arKey, p->nKeyLength - 1); in zend_hash_get_current_key_ex()
1084 *str_length = p->nKeyLength; in zend_hash_get_current_key_ex()
1104 } else if (p->nKeyLength) { in zend_hash_get_current_key_zval_ex()
1106 Z_STRVAL_P(key) = IS_INTERNED(p->arKey) ? (char*)p->arKey : estrndup(p->arKey, p->nKeyLength - 1); in zend_hash_get_current_key_zval_ex()
1107 Z_STRLEN_P(key) = p->nKeyLength - 1; in zend_hash_get_current_key_zval_ex()
1123 if (p->nKeyLength) { in zend_hash_get_current_key_type_ex()
1167 if (!p->nKeyLength && p->h == num_index) { in zend_hash_update_current_key_ex()
1173 if (!q->nKeyLength && q->h == num_index) { in zend_hash_update_current_key_ex()
1186 (p->nKeyLength == str_length && in zend_hash_update_current_key_ex()
1196 (q->h == h && q->nKeyLength == str_length && in zend_hash_update_current_key_ex()
1241 (!IS_INTERNED(p->arKey) && p->nKeyLength != str_length)) { in zend_hash_update_current_key_ex()
1250 q->nKeyLength = str_length; in zend_hash_update_current_key_ex()
1277 p->nKeyLength = str_length; in zend_hash_update_current_key_ex()
1317 if (p->nKeyLength == 0) { in _zend_hash_splice()
1320 …zend_hash_quick_update(removed, p->arKey, p->nKeyLength, p->h, p->pData, sizeof(zval *), &new_entr… in _zend_hash_splice()
1345 q->nKeyLength = 0; in _zend_hash_splice()
1448 if (p1->nKeyLength==0 && p2->nKeyLength==0) { /* numeric indices */ in zend_hash_compare()
1455 result = p1->nKeyLength - p2->nKeyLength; in zend_hash_compare()
1461 result = memcmp(p1->arKey, p2->arKey, p1->nKeyLength); in zend_hash_compare()
1470 if (p1->nKeyLength==0) { /* numeric index */ in zend_hash_compare()
1477 if (zend_hash_quick_find(ht2, p1->arKey, p1->nKeyLength, p1->h, &pData2)==FAILURE) { in zend_hash_compare()