Lines Matching refs:dk
299 #define DK_SIZE(dk) ((dk)->dk_size) argument
301 #define DK_IXSIZE(dk) \ argument
302 (DK_SIZE(dk) <= 0xff ? \
303 1 : DK_SIZE(dk) <= 0xffff ? \
304 2 : DK_SIZE(dk) <= 0xffffffff ? \
307 #define DK_IXSIZE(dk) \ argument
308 (DK_SIZE(dk) <= 0xff ? \
309 1 : DK_SIZE(dk) <= 0xffff ? \
312 #define DK_ENTRIES(dk) \ argument
313 ((PyDictKeyEntry*)(&((int8_t*)((dk)->dk_indices))[DK_SIZE(dk) * DK_IXSIZE(dk)]))
315 #define DK_MASK(dk) (((dk)->dk_size)-1) argument
321 dictkeys_incref(PyDictKeysObject *dk) in dictkeys_incref() argument
326 dk->dk_refcnt++; in dictkeys_incref()
330 dictkeys_decref(PyDictKeysObject *dk) in dictkeys_decref() argument
332 assert(dk->dk_refcnt > 0); in dictkeys_decref()
336 if (--dk->dk_refcnt == 0) { in dictkeys_decref()
337 free_keys_object(dk); in dictkeys_decref()
568 PyDictKeysObject *dk; in new_keys_object() local
596 dk = state->keys_free_list[--state->keys_numfree]; in new_keys_object()
600 dk = PyObject_Malloc(sizeof(PyDictKeysObject) in new_keys_object()
603 if (dk == NULL) { in new_keys_object()
611 dk->dk_refcnt = 1; in new_keys_object()
612 dk->dk_size = size; in new_keys_object()
613 dk->dk_usable = usable; in new_keys_object()
614 dk->dk_lookup = lookdict_unicode_nodummy; in new_keys_object()
615 dk->dk_nentries = 0; in new_keys_object()
616 memset(&dk->dk_indices[0], 0xff, es * size); in new_keys_object()
617 memset(DK_ENTRIES(dk), 0, sizeof(PyDictKeyEntry) * usable); in new_keys_object()
618 return dk; in new_keys_object()
799 PyDictKeysObject *dk; in lookdict() local
803 dk = mp->ma_keys; in lookdict()
804 ep0 = DK_ENTRIES(dk); in lookdict()
805 mask = DK_MASK(dk); in lookdict()
810 Py_ssize_t ix = dictkeys_get_index(dk, i); in lookdict()
831 if (dk == mp->ma_keys && ep->me_key == startkey) { in lookdict()