From 14356a7db91c9d983ac859b36674c2e7d9fd31e9 Mon Sep 17 00:00:00 2001 From: GrieferAtWork Date: Thu, 9 May 2024 19:07:17 +0200 Subject: [PATCH] Add sequence operators to fix the unbound vs. missing problem These will also come in handy when it comes to re-implementing stuff like `Sequence.find` --- include/deemon/class.h | 529 +++-- include/deemon/object.h | 56 +- include/deemon/super.h | 2 + src/deemon/execute/function-wrappers.c | 16 +- src/deemon/execute/module_globals.c | 2 + src/deemon/objects/bytes.c | 2 + src/deemon/objects/cached-dict.c | 2 + src/deemon/objects/class_desc.c | 6 + src/deemon/objects/dict.c | 2 + src/deemon/objects/dictproxy.c | 8 + src/deemon/objects/gc_inspect.c | 2 + src/deemon/objects/hashset.c | 2 + src/deemon/objects/list.c | 2 + src/deemon/objects/map.c | 8 + src/deemon/objects/none.c | 2 + src/deemon/objects/rodict.c | 2 + src/deemon/objects/roset.c | 2 + src/deemon/objects/seq.c | 2 + src/deemon/objects/seq/concat.c | 2 + src/deemon/objects/seq/default-sequences.c | 14 + src/deemon/objects/seq/each-fastpass.c.inl | 2 + src/deemon/objects/seq/each.c | 4 + src/deemon/objects/seq/range.c | 2 + src/deemon/objects/seq/repeat.c | 4 + src/deemon/objects/seq/segments.c | 2 + src/deemon/objects/seq/simpleproxy.c | 6 + src/deemon/objects/seq/smap.c | 2 + src/deemon/objects/seq/svec.c | 4 + src/deemon/objects/seq/transform.c | 2 + src/deemon/objects/seq/typemro.c | 4 + src/deemon/objects/set.c | 2 + src/deemon/objects/string.c | 2 + src/deemon/objects/super.c | 12 + src/deemon/objects/tuple.c | 2 + .../objects/unicode/bytes_segments.c.inl | 2 + src/deemon/objects/unicode/ordinals.c.inl | 2 + src/deemon/objects/unicode/regroups.c | 6 + src/deemon/objects/unicode/reproxy.c.inl | 16 + src/deemon/objects/unicode/segments.c.inl | 2 + src/deemon/runtime/kwds-wrappers.c | 4 + src/deemon/runtime/kwds.c | 4 + src/deemon/runtime/operator.c | 1869 +++++++++++++---- src/deemon/runtime/runtime_error.c | 16 + src/deemon/runtime/runtime_error.h | 4 + src/dex/collections/bitset.c | 6 + src/dex/collections/deque.c | 2 + src/dex/collections/fixedlist.c | 2 + src/dex/collections/udict.c | 4 + src/dex/collections/uset.c | 4 + 49 files changed, 2071 insertions(+), 585 deletions(-) diff --git a/include/deemon/class.h b/include/deemon/class.h index 54dcadc5a..0c9c3302f 100644 --- a/include/deemon/class.h +++ b/include/deemon/class.h @@ -1428,6 +1428,8 @@ INTDEF WUNUSED NONNULL((1, 2)) dssize_t DCALL instance_enumattr(DeeTypeObject *t : (*(tp_setrange))(self, start, end, values)) #define DeeType_invoke_seq_tp_foreach_NODEFAULT(tp_self, tp_foreach, self, proc, arg) (*tp_foreach)(self, proc, arg) #define DeeType_invoke_seq_tp_foreach_pair_NODEFAULT(tp_self, tp_foreach_pair, self, proc, arg) (*tp_foreach_pair)(self, proc, arg) +#define DeeType_invoke_seq_tp_enumerate_NODEFAULT(tp_self, tp_enumerate, self, proc, arg) (*tp_enumerate)(self, proc, arg) +#define DeeType_invoke_seq_tp_enumerate_index_NODEFAULT(tp_self, tp_enumerate_index, self, proc, arg, starthint, endhint) (*tp_enumerate_index)(self, proc, arg, starthint, endhint) #define DeeType_invoke_seq_tp_bounditem_NODEFAULT(tp_self, tp_bounditem, self, index) (*tp_bounditem)(self, index) #define DeeType_invoke_seq_tp_hasitem_NODEFAULT(tp_self, tp_hasitem, self, index) (*tp_hasitem)(self, index) #define DeeType_invoke_seq_tp_size_NODEFAULT(tp_self, tp_size, self) (*tp_size)(self) @@ -1688,7 +1690,7 @@ INTDEF struct type_cmp DeeSeq_DefaultCmpWithSizeAndGetItemIndex; INTDEF struct type_cmp DeeSeq_DefaultCmpWithSizeObAndGetItem; INTDEF struct type_cmp DeeSeq_DefaultCmpWithForeachDefault; INTDEF struct type_cmp DeeSet_DefaultCmpWithForeachDefault; -INTDEF struct type_cmp DeeMap_DefaultCmpWithForeachPairDefault; +INTDEF struct type_cmp DeeMap_DefaultCmpWithEnumerateDefault; /* Default wrappers for implementing sequence operators. */ @@ -1696,6 +1698,8 @@ INTDEF struct type_cmp DeeMap_DefaultCmpWithForeachPairDefault; /* tp_iter */ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultIterWithForeach(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultIterWithForeachPair(DeeObject *__restrict self); +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultIterWithEnumerate(DeeObject *__restrict self); +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultIterWithEnumerateIndex(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultIterWithSizeAndGetItemIndexFast(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultIterWithSizeAndTryGetItemIndex(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultIterWithSizeAndGetItemIndex(DeeObject *__restrict self); @@ -1705,6 +1709,8 @@ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultIterWithGetItem( /* tp_foreach */ INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachWithIter(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachWithEnumerate(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachWithEnumerateIndex(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachWithForeachPair(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultForeachWithSizeAndGetItemIndexFast(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultForeachWithSizeAndTryGetItemIndex(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); @@ -1715,8 +1721,41 @@ INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultForeachWithGetIte /* tp_foreach_pair */ INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachPairWithForeach(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachPairWithEnumerate(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachPairWithEnumerateIndex(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachPairWithForeachDefault(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultForeachPairWithIter(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeMap_DefaultForeachPairWithEnumerate(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeMap_DefaultForeachPairWithEnumerateIndex(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); + +/* tp_enumerate */ +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultEnumerateWithEnumerateIndex(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithSizeAndGetItemIndexFast(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithSizeAndTryGetItemIndex(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithSizeAndGetItemIndex(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithSizeObAndGetItem(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithCounterAndForeach(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithCounterAndIter(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeMap_DefaultEnumerateWithForeachPairDefault(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +#if 0 +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeMap_DefaultEnumerateWithIter(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); +#endif +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateWithCounterAndForeachDefault(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); /* May call other DEFAULT operators */ +#define DeeMap_DefaultEnumerateWithIter DeeObject_DefaultForeachPairWithIter +#define DeeMap_TDefaultEnumerateWithIter DeeObject_TDefaultForeachPairWithIter + +/* tp_enumerate_index */ +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultEnumerateIndexWithEnumerate(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndexFast(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithSizeAndTryGetItemIndex(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndex(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithSizeObAndGetItem(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithCounterAndForeach(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithCounterAndIter(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeSeq_DefaultEnumerateIndexWithCounterAndForeachDefault(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL DeeObject_DefaultEnumerateIndexWithEnumerateDefault(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); /* May call other DEFAULT operators */ /* tp_sizeob */ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultSizeObWithSize(DeeObject *__restrict self); @@ -1724,6 +1763,8 @@ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultSizeObWithSiz /* tp_size */ INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeObject_DefaultSizeWithSizeOb(DeeObject *__restrict self); +INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeSeq_DefaultSizeWithEnumerateIndex(DeeObject *__restrict self); +INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeSeq_DefaultSizeWithEnumerate(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeSeq_DefaultSizeWithForeachPair(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeSeq_DefaultSizeWithForeach(DeeObject *__restrict self); INTDEF WUNUSED NONNULL((1)) size_t DCALL DeeSeq_DefaultSizeWithIter(DeeObject *__restrict self); @@ -1749,8 +1790,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithT INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithGetItemStringHash(DeeObject *self, DeeObject *elem); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithGetItemStringLenHash(DeeObject *self, DeeObject *elem); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithGetItemIndex(DeeObject *self, DeeObject *elem); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithForeachPair(DeeObject *self, DeeObject *elem); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithForeachDefault(DeeObject *self, DeeObject *elem); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithEnumerate(DeeObject *self, DeeObject *elem); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultContainsWithEnumerateDefault(DeeObject *self, DeeObject *elem); /* tp_getitem */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemWithSizeAndGetItemIndexFast(DeeObject *self, DeeObject *index); @@ -1766,8 +1807,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemWithTr INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemWithTryGetItemAndSize(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndexOb(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndex(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemWithForeachPair(DeeObject *__restrict self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemWithForeachPairDefault(DeeObject *__restrict self, DeeObject *index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemWithEnumerate(DeeObject *__restrict self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemWithEnumerateDefault(DeeObject *__restrict self, DeeObject *index); /* May call other DEFAULT operators */ /* tp_getitem_index */ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultGetItemIndexWithSizeAndGetItemIndexFast(DeeObject *__restrict self, size_t index); @@ -1781,8 +1822,8 @@ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemIndexWith INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemIndexWithTryGetItemAndSize(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemIndexWithTryGetItemAndSizeOb(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeSeq_DefaultGetItemIndexWithForeachDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ -INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultGetItemIndexWithForeachPair(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultGetItemIndexWithForeachPairDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultGetItemIndexWithEnumerate(DeeObject *__restrict self, size_t index); +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultGetItemIndexWithEnumerateDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ /* tp_getitem_string_hash */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringHashWithGetItemStringLenHash(DeeObject *__restrict self, char const *key, Dee_hash_t hash); @@ -1792,8 +1833,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStr INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringHashWithTryGetItem(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringHashWithGetItemDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringHashWithForeachPair(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringHashWithEnumerate(DeeObject *__restrict self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_getitem_string_len_hash */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringLenHashWithGetItemStringHash(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); @@ -1803,8 +1844,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStr INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringLenHashWithTryGetItem(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringLenHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultGetItemStringLenHashWithGetItemDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringLenHashWithForeachPair(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringLenHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringLenHashWithEnumerate(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultGetItemStringLenHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_trygetitem */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemWithTryGetItemIndex(DeeObject *self, DeeObject *index); @@ -1816,8 +1857,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItem INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemWithGetItemStringHash(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemWithGetItemStringLenHash(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemWithGetItemDefault(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemWithForeachPair(DeeObject *__restrict self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemWithForeachPairDefault(DeeObject *__restrict self, DeeObject *index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemWithEnumerate(DeeObject *__restrict self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemWithEnumerateDefault(DeeObject *__restrict self, DeeObject *index); /* May call other DEFAULT operators */ /* tp_trygetitem_index */ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemIndexWithSizeAndGetItemIndexFast(DeeObject *__restrict self, size_t index); @@ -1826,8 +1867,8 @@ INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemInd INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemIndexWithGetItem(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemIndexWithErrorRequiresString(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemIndexWithGetItemIndexDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ -INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemIndexWithForeachPair(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemIndexWithForeachPairDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemIndexWithEnumerate(DeeObject *__restrict self, size_t index); +INTDEF WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemIndexWithEnumerateDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ /* tp_trygetitem_string_hash */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringHashWithTryGetItemStringLenHash(DeeObject *__restrict self, char const *key, Dee_hash_t hash); @@ -1837,8 +1878,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItem INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringHashWithGetItem(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringHashWithTryGetItemDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringHashWithForeachPair(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringHashWithEnumerate(DeeObject *__restrict self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_trygetitem_string_len_hash */ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemStringHash(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); @@ -1848,8 +1889,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItem INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringLenHashWithGetItem(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringLenHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringLenHashWithForeachPair(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringLenHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringLenHashWithEnumerate(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_DefaultTryGetItemStringLenHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_delitem */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultDelItemWithDelItemIndex(DeeObject *self, DeeObject *index); @@ -1913,8 +1954,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemWithTryGetIte INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemWithTryGetItemStringHash(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemWithGetItemDefault(DeeObject *self, DeeObject *index); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemWithContains(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemWithForeachPair(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemWithForeachPairDefault(DeeObject *self, DeeObject *index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemWithEnumerate(DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemWithEnumerateDefault(DeeObject *self, DeeObject *index); /* May call other DEFAULT operators */ /* tp_bounditem_index */ INTDEF WUNUSED NONNULL((1)) int DCALL DeeObject_DefaultBoundItemIndexWithBoundItem(DeeObject *__restrict self, size_t index); @@ -1928,8 +1969,8 @@ INTDEF WUNUSED NONNULL((1)) int DCALL DeeSeq_DefaultBoundItemIndexWithSizeAndTry INTDEF WUNUSED NONNULL((1)) int DCALL DeeSeq_DefaultBoundItemIndexWithTryGetItemAndSizeOb(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) int DCALL DeeObject_DefaultBoundItemIndexWithErrorRequiresString(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultBoundItemIndexWithContains(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultBoundItemIndexWithForeachPair(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultBoundItemIndexWithForeachPairDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultBoundItemIndexWithEnumerate(DeeObject *__restrict self, size_t index); +INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultBoundItemIndexWithEnumerateDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ /* tp_bounditem_string_hash */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringHashWithBoundItemStringLenHash(DeeObject *__restrict self, char const *key, Dee_hash_t hash); @@ -1946,8 +1987,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringHashWit INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringHashWithBoundItemDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringHashWithContains(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringHashWithForeachPair(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringHashWithEnumerate(DeeObject *__restrict self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_bounditem_string_len_hash */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringLenHashWithBoundItemStringHash(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); @@ -1964,8 +2005,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringLenHash INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringLenHashWithBoundItemDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultBoundItemStringLenHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringLenHashWithContains(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringLenHashWithForeachPair(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringLenHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringLenHashWithEnumerate(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultBoundItemStringLenHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_hasitem */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemWithHasItemStringHash(DeeObject *self, DeeObject *index); @@ -1987,8 +2028,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemWithGetItemDefa INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_DefaultHasItemWithSize(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_DefaultHasItemWithSizeOb(DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemWithContains(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemWithForeachPair(DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemWithForeachPairDefault(DeeObject *self, DeeObject *index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemWithEnumerate(DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemWithEnumerateDefault(DeeObject *self, DeeObject *index); /* May call other DEFAULT operators */ /* tp_hasitem_index */ INTDEF WUNUSED NONNULL((1)) int DCALL DeeObject_DefaultHasItemIndexWithHasItem(DeeObject *__restrict self, size_t index); @@ -2003,8 +2044,8 @@ INTDEF WUNUSED NONNULL((1)) int DCALL DeeObject_DefaultHasItemIndexWithErrorRequ INTDEF WUNUSED NONNULL((1)) int DCALL DeeSeq_DefaultHasItemIndexWithSize(DeeObject *__restrict self, size_t index); INTDEF WUNUSED NONNULL((1)) int DCALL DeeSeq_DefaultHasItemIndexWithSizeDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultHasItemIndexWithContains(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultHasItemIndexWithForeachPair(DeeObject *__restrict self, size_t index); -INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultHasItemIndexWithForeachPairDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultHasItemIndexWithEnumerate(DeeObject *__restrict self, size_t index); +INTDEF WUNUSED NONNULL((1)) int DCALL DeeMap_DefaultHasItemIndexWithEnumerateDefault(DeeObject *__restrict self, size_t index); /* May call other DEFAULT operators */ /* tp_hasitem_string_hash */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringHashWithHasItemStringLenHash(DeeObject *__restrict self, char const *key, Dee_hash_t hash); @@ -2021,8 +2062,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringHashWithG INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringHashWithHasItemDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringHashWithContains(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringHashWithForeachPair(DeeObject *__restrict self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringHashWithEnumerate(DeeObject *__restrict self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_hasitem_string_len_hash */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringLenHashWithHasItemStringHash(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); @@ -2039,8 +2080,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringLenHashWi INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringLenHashWithHasItemDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_DefaultHasItemStringLenHashWithErrorRequiresInt(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringLenHashWithContains(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringLenHashWithForeachPair(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringLenHashWithForeachPairDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringLenHashWithEnumerate(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_DefaultHasItemStringLenHashWithEnumerateDefault(DeeObject *__restrict self, char const *key, size_t keylen, Dee_hash_t hash); /* May call other DEFAULT operators */ /* tp_getrange */ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_DefaultGetRangeWithGetRangeIndexAndGetRangeIndexN(DeeObject *self, DeeObject *start, DeeObject *end); @@ -2236,6 +2277,8 @@ function getOperatorPackage(name: string): string { "SizeOb" : "seq", "Foreach" : "seq", "ForeachPair" : "seq", + "Enumerate" : "seq", + "EnumerateIndex" : "seq", "Contains" : "seq", }.get(name, "math"); } @@ -2417,6 +2460,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeSeq_TDefaultCompareWithSizeObAndG INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeSeq_TDefaultCompareWithForeachDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *other); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultIterWithForeach(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultIterWithForeachPair(DeeTypeObject *tp_self, DeeObject *self); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultIterWithEnumerate(DeeTypeObject *tp_self, DeeObject *self); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultIterWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithSizeAndTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithSizeAndGetItemIndex(DeeTypeObject *tp_self, DeeObject *self); @@ -2424,6 +2469,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithGetI INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithSizeObAndGetItem(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultIterWithGetItem(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachWithIter(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultForeachWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultForeachWithSizeAndTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); @@ -2432,11 +2479,38 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultForeachWithSi INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultForeachWithSizeDefaultAndGetItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultForeachWithGetItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachPairWithForeach(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachPairWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachPairWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachPairWithForeachDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultForeachPairWithIter(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeMap_TDefaultForeachPairWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeMap_TDefaultForeachPairWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultEnumerateWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithSizeAndTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithSizeObAndGetItem(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithCounterAndForeach(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithCounterAndIter(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeMap_TDefaultEnumerateWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeMap_TDefaultEnumerateWithIter(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithSizeDefaultAndGetItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateWithCounterAndForeachDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultEnumerateIndexWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithSizeAndTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithSizeObAndGetItem(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithCounterAndForeach(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithCounterAndIter(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeSeq_TDefaultEnumerateIndexWithCounterAndForeachDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); +INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL DeeObject_TDefaultEnumerateIndexWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultSizeObWithSize(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultSizeObWithSizeDefault(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeObject_TDefaultSizeWithSizeOb(DeeTypeObject *tp_self, DeeObject *self); +INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeSeq_TDefaultSizeWithEnumerateIndex(DeeTypeObject *tp_self, DeeObject *self); +INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeSeq_TDefaultSizeWithEnumerate(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeSeq_TDefaultSizeWithForeachPair(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeSeq_TDefaultSizeWithForeach(DeeTypeObject *tp_self, DeeObject *self); INTDEF WUNUSED NONNULL((1, 2)) size_t DCALL DeeSeq_TDefaultSizeWithIter(DeeTypeObject *tp_self, DeeObject *self); @@ -2458,8 +2532,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsW INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithForeachDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultContainsWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *elem); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemWithGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); @@ -2473,8 +2547,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemWi INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemWithTryGetItemAndSize(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndexOb(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemIndexWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemIndexWithTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemIndexWithGetItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); @@ -2486,8 +2560,8 @@ INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemIndex INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSize(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSizeOb(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeSeq_TDefaultGetItemIndexWithForeachDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemIndexWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemIndexWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemIndexWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemIndexWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithTryGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); @@ -2495,8 +2569,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetIte INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithTryGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringHashWithGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithTryGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); @@ -2504,8 +2578,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetIte INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithTryGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultGetItemStringLenHashWithGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringLenHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringLenHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringLenHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultGetItemStringLenHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithTryGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithTryGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithTryGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); @@ -2515,16 +2589,16 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGet INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemWithGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithTryGetItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithGetItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithErrorRequiresString(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemIndexWithGetItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemIndexWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemIndexWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemIndexWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemIndexWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithTryGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithTryGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); @@ -2532,8 +2606,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGet INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringHashWithTryGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); @@ -2541,8 +2615,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGet INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithGetItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringLenHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringLenHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringLenHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *DCALL DeeMap_TDefaultTryGetItemStringLenHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultDelItemWithDelItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultDelItemWithDelItemIndexDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultDelItemWithDelItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); @@ -2588,8 +2662,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemWithTryGe INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemWithTryGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemWithGetItemDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemWithContains(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultBoundItemIndexWithBoundItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultBoundItemIndexWithSizeAndGetItemIndexFast(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultBoundItemIndexWithGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, size_t index); @@ -2601,8 +2675,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_TDefaultBoundItemIndexWithSizeAn INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_TDefaultBoundItemIndexWithTryGetItemAndSizeOb(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultBoundItemIndexWithErrorRequiresString(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultBoundItemIndexWithContains(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultBoundItemIndexWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultBoundItemIndexWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultBoundItemIndexWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultBoundItemIndexWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHashWithBoundItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHashWithBoundItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHashWithGetItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); @@ -2617,8 +2691,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHas INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHashWithBoundItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringHashWithContains(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLenHashWithBoundItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLenHashWithBoundItem(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLenHashWithGetItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); @@ -2633,8 +2707,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLen INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLenHashWithBoundItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultBoundItemStringLenHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringLenHashWithContains(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringLenHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringLenHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringLenHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultBoundItemStringLenHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemWithHasItemStringHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemWithHasItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemWithHasItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); @@ -2654,8 +2728,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemWithGetItem INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeSeq_TDefaultHasItemWithSize(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeSeq_TDefaultHasItemWithSizeOb(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemWithContains(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultHasItemIndexWithHasItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultHasItemIndexWithBoundItemIndex(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultHasItemIndexWithBoundItem(DeeTypeObject *tp_self, DeeObject *self, size_t index); @@ -2668,8 +2742,8 @@ INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeObject_TDefaultHasItemIndexWithError INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_TDefaultHasItemIndexWithSize(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeSeq_TDefaultHasItemIndexWithSizeDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultHasItemIndexWithContains(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultHasItemIndexWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, size_t index); -INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultHasItemIndexWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultHasItemIndexWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, size_t index); +INTDEF WUNUSED NONNULL((1, 2)) int DCALL DeeMap_TDefaultHasItemIndexWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, size_t index); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashWithHasItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashWithBoundItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashWithBoundItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); @@ -2684,8 +2758,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashW INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashWithHasItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringHashWithContains(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHashWithHasItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHashWithBoundItemStringLenHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHashWithBoundItemStringHash(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); @@ -2700,8 +2774,8 @@ INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHa INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHashWithHasItemDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeObject_TDefaultHasItemStringLenHashWithErrorRequiresInt(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringLenHashWithContains(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringLenHashWithForeachPair(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); -INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringLenHashWithForeachPairDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringLenHashWithEnumerate(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); +INTDEF WUNUSED NONNULL((1, 2, 3)) int DCALL DeeMap_TDefaultHasItemStringLenHashWithEnumerateDefault(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash); INTDEF WUNUSED NONNULL((1, 2, 3, 4)) DREF DeeObject *DCALL DeeObject_TDefaultGetRangeWithGetRangeIndexAndGetRangeIndexN(DeeTypeObject *tp_self, DeeObject *self, DeeObject *start, DeeObject *end); INTDEF WUNUSED NONNULL((1, 2, 3, 4)) DREF DeeObject *DCALL DeeObject_TDefaultGetRangeWithGetRangeIndexDefaultAndGetRangeIndexNDefault(DeeTypeObject *tp_self, DeeObject *self, DeeObject *start, DeeObject *end); INTDEF WUNUSED NONNULL((1, 2, 3, 4)) DREF DeeObject *DCALL DeeSeq_TDefaultGetRangeWithSizeDefaultAndGetItemIndex(DeeTypeObject *tp_self, DeeObject *self, DeeObject *start, DeeObject *end); @@ -2935,6 +3009,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz #define DeeType_MapDefaultIter(tp_iter, map, default) \ ((tp_iter) == &DeeObject_DefaultIterWithForeach ? map(DeeObject_TDefaultIterWithForeach) : \ (tp_iter) == &DeeObject_DefaultIterWithForeachPair ? map(DeeObject_TDefaultIterWithForeachPair) : \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerate ? map(DeeObject_TDefaultIterWithEnumerate) : \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerateIndex ? map(DeeObject_TDefaultIterWithEnumerateIndex) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndexFast ? map(DeeSeq_TDefaultIterWithSizeAndGetItemIndexFast) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultIterWithSizeAndTryGetItemIndex) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndex ? map(DeeSeq_TDefaultIterWithSizeAndGetItemIndex) : \ @@ -2943,6 +3019,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_iter) == &DeeSeq_DefaultIterWithGetItem ? map(DeeSeq_TDefaultIterWithGetItem) : default) #define DeeType_MapDefaultForeach(tp_foreach, map, default) \ ((tp_foreach) == &DeeObject_DefaultForeachWithIter ? map(DeeObject_TDefaultForeachWithIter) : \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerate ? map(DeeObject_TDefaultForeachWithEnumerate) : \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerateIndex ? map(DeeObject_TDefaultForeachWithEnumerateIndex) : \ (tp_foreach) == &DeeObject_DefaultForeachWithForeachPair ? map(DeeObject_TDefaultForeachWithForeachPair) : \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndGetItemIndexFast ? map(DeeSeq_TDefaultForeachWithSizeAndGetItemIndexFast) : \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultForeachWithSizeAndTryGetItemIndex) : \ @@ -2952,13 +3030,42 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_foreach) == &DeeSeq_DefaultForeachWithGetItemIndexDefault ? map(DeeSeq_TDefaultForeachWithGetItemIndexDefault) : default) #define DeeType_MapDefaultForeachPair(tp_foreach_pair, map, default) \ ((tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeach ? map(DeeObject_TDefaultForeachPairWithForeach) : \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerate ? map(DeeObject_TDefaultForeachPairWithEnumerate) : \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerateIndex ? map(DeeObject_TDefaultForeachPairWithEnumerateIndex) : \ (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeachDefault ? map(DeeObject_TDefaultForeachPairWithForeachDefault) : \ - (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithIter ? map(DeeObject_TDefaultForeachPairWithIter) : default) + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithIter ? map(DeeObject_TDefaultForeachPairWithIter) : \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerate ? map(DeeMap_TDefaultForeachPairWithEnumerate) : \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerateIndex ? map(DeeMap_TDefaultForeachPairWithEnumerateIndex) : default) +#define DeeType_MapDefaultEnumerate(tp_enumerate, map, default) \ + ((tp_enumerate) == &DeeObject_DefaultEnumerateWithEnumerateIndex ? map(DeeObject_TDefaultEnumerateWithEnumerateIndex) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndexFast ? map(DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndexFast) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultEnumerateWithSizeAndTryGetItemIndex) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndex ? map(DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndex) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeObAndGetItem ? map(DeeSeq_TDefaultEnumerateWithSizeObAndGetItem) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeach ? map(DeeSeq_TDefaultEnumerateWithCounterAndForeach) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndIter ? map(DeeSeq_TDefaultEnumerateWithCounterAndIter) : \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithForeachPairDefault ? map(DeeMap_TDefaultEnumerateWithForeachPairDefault) : \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithIter ? map(DeeMap_TDefaultEnumerateWithIter) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault ? map(DeeSeq_TDefaultEnumerateWithSizeDefaultAndGetItemIndexDefault) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeachDefault ? map(DeeSeq_TDefaultEnumerateWithCounterAndForeachDefault) : default) +#define DeeType_MapDefaultEnumerateIndex(tp_enumerate_index, map, default) \ + ((tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerate ? map(DeeObject_TDefaultEnumerateIndexWithEnumerate) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndexFast ? map(DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndexFast) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultEnumerateIndexWithSizeAndTryGetItemIndex) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndex ? map(DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndex) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeObAndGetItem ? map(DeeSeq_TDefaultEnumerateIndexWithSizeObAndGetItem) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeach ? map(DeeSeq_TDefaultEnumerateIndexWithCounterAndForeach) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndIter ? map(DeeSeq_TDefaultEnumerateIndexWithCounterAndIter) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault ? map(DeeSeq_TDefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeachDefault ? map(DeeSeq_TDefaultEnumerateIndexWithCounterAndForeachDefault) : \ + (tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerateDefault ? map(DeeObject_TDefaultEnumerateIndexWithEnumerateDefault) : default) #define DeeType_MapDefaultSizeOb(tp_sizeob, map, default) \ ((tp_sizeob) == &DeeObject_DefaultSizeObWithSize ? map(DeeObject_TDefaultSizeObWithSize) : \ (tp_sizeob) == &DeeObject_DefaultSizeObWithSizeDefault ? map(DeeObject_TDefaultSizeObWithSizeDefault) : default) #define DeeType_MapDefaultSize(tp_size, map, default) \ ((tp_size) == &DeeObject_DefaultSizeWithSizeOb ? map(DeeObject_TDefaultSizeWithSizeOb) : \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerateIndex ? map(DeeSeq_TDefaultSizeWithEnumerateIndex) : \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerate ? map(DeeSeq_TDefaultSizeWithEnumerate) : \ (tp_size) == &DeeSeq_DefaultSizeWithForeachPair ? map(DeeSeq_TDefaultSizeWithForeachPair) : \ (tp_size) == &DeeSeq_DefaultSizeWithForeach ? map(DeeSeq_TDefaultSizeWithForeach) : \ (tp_size) == &DeeSeq_DefaultSizeWithIter ? map(DeeSeq_TDefaultSizeWithIter) : default) @@ -2981,8 +3088,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringHash ? map(DeeMap_TDefaultContainsWithGetItemStringHash) : \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringLenHash ? map(DeeMap_TDefaultContainsWithGetItemStringLenHash) : \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemIndex ? map(DeeMap_TDefaultContainsWithGetItemIndex) : \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachPair ? map(DeeMap_TDefaultContainsWithForeachPair) : \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachDefault ? map(DeeMap_TDefaultContainsWithForeachDefault) : default) + (tp_contains) == &DeeMap_DefaultContainsWithEnumerate ? map(DeeMap_TDefaultContainsWithEnumerate) : \ + (tp_contains) == &DeeMap_DefaultContainsWithEnumerateDefault ? map(DeeMap_TDefaultContainsWithEnumerateDefault) : default) #define DeeType_MapDefaultGetItem(tp_getitem, map, default) \ ((tp_getitem) == &DeeObject_DefaultGetItemWithSizeAndGetItemIndexFast ? map(DeeObject_TDefaultGetItemWithSizeAndGetItemIndexFast) : \ (tp_getitem) == &DeeObject_DefaultGetItemWithGetItemIndex ? map(DeeObject_TDefaultGetItemWithGetItemIndex) : \ @@ -2997,8 +3104,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem) == &DeeSeq_DefaultGetItemWithTryGetItemAndSize ? map(DeeSeq_TDefaultGetItemWithTryGetItemAndSize) : \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndexOb ? map(DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndexOb) : \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndex) : \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPair ? map(DeeMap_TDefaultGetItemWithForeachPair) : \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPairDefault ? map(DeeMap_TDefaultGetItemWithForeachPairDefault) : default) + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerate ? map(DeeMap_TDefaultGetItemWithEnumerate) : \ + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerateDefault ? map(DeeMap_TDefaultGetItemWithEnumerateDefault) : default) #define DeeType_MapDefaultGetItemIndex(tp_getitem_index, map, default) \ ((tp_getitem_index) == &DeeObject_DefaultGetItemIndexWithSizeAndGetItemIndexFast ? map(DeeObject_TDefaultGetItemIndexWithSizeAndGetItemIndexFast) : \ (tp_getitem_index) == &DeeObject_DefaultGetItemIndexWithTryGetItemIndex ? map(DeeObject_TDefaultGetItemIndexWithTryGetItemIndex) : \ @@ -3010,8 +3117,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSize ? map(DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSize) : \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSizeOb ? map(DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSizeOb) : \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithForeachDefault ? map(DeeSeq_TDefaultGetItemIndexWithForeachDefault) : \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPair ? map(DeeMap_TDefaultGetItemIndexWithForeachPair) : \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPairDefault ? map(DeeMap_TDefaultGetItemIndexWithForeachPairDefault) : default) + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerate ? map(DeeMap_TDefaultGetItemIndexWithEnumerate) : \ + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerateDefault ? map(DeeMap_TDefaultGetItemIndexWithEnumerateDefault) : default) #define DeeType_MapDefaultGetItemStringHash(tp_getitem_string_hash, map, default) \ ((tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemStringLenHash ? map(DeeObject_TDefaultGetItemStringHashWithGetItemStringLenHash) : \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItem ? map(DeeObject_TDefaultGetItemStringHashWithGetItem) : \ @@ -3019,8 +3126,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithTryGetItemStringLenHash ? map(DeeObject_TDefaultGetItemStringHashWithTryGetItemStringLenHash) : \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithTryGetItem ? map(DeeObject_TDefaultGetItemStringHashWithTryGetItem) : \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemDefault ? map(DeeObject_TDefaultGetItemStringHashWithGetItemDefault) : \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPair ? map(DeeMap_TDefaultGetItemStringHashWithForeachPair) : \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPairDefault ? map(DeeMap_TDefaultGetItemStringHashWithForeachPairDefault) : default) + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerate ? map(DeeMap_TDefaultGetItemStringHashWithEnumerate) : \ + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerateDefault ? map(DeeMap_TDefaultGetItemStringHashWithEnumerateDefault) : default) #define DeeType_MapDefaultGetItemStringLenHash(tp_getitem_string_len_hash, map, default) \ ((tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemStringHash ? map(DeeObject_TDefaultGetItemStringLenHashWithGetItemStringHash) : \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItem ? map(DeeObject_TDefaultGetItemStringLenHashWithGetItem) : \ @@ -3028,8 +3135,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithTryGetItemStringHash ? map(DeeObject_TDefaultGetItemStringLenHashWithTryGetItemStringHash) : \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithTryGetItem ? map(DeeObject_TDefaultGetItemStringLenHashWithTryGetItem) : \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemDefault ? map(DeeObject_TDefaultGetItemStringLenHashWithGetItemDefault) : \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPair ? map(DeeMap_TDefaultGetItemStringLenHashWithForeachPair) : \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPairDefault ? map(DeeMap_TDefaultGetItemStringLenHashWithForeachPairDefault) : default) + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerate ? map(DeeMap_TDefaultGetItemStringLenHashWithEnumerate) : \ + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerateDefault ? map(DeeMap_TDefaultGetItemStringLenHashWithEnumerateDefault) : default) #define DeeType_MapDefaultTryGetItem(tp_trygetitem, map, default) \ ((tp_trygetitem) == &DeeObject_DefaultTryGetItemWithTryGetItemIndex ? map(DeeObject_TDefaultTryGetItemWithTryGetItemIndex) : \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithTryGetItemStringHash ? map(DeeObject_TDefaultTryGetItemWithTryGetItemStringHash) : \ @@ -3040,16 +3147,16 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringHash ? map(DeeObject_TDefaultTryGetItemWithGetItemStringHash) : \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringLenHash ? map(DeeObject_TDefaultTryGetItemWithGetItemStringLenHash) : \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemDefault ? map(DeeObject_TDefaultTryGetItemWithGetItemDefault) : \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPair ? map(DeeMap_TDefaultTryGetItemWithForeachPair) : \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPairDefault ? map(DeeMap_TDefaultTryGetItemWithForeachPairDefault) : default) + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerate ? map(DeeMap_TDefaultTryGetItemWithEnumerate) : \ + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerateDefault ? map(DeeMap_TDefaultTryGetItemWithEnumerateDefault) : default) #define DeeType_MapDefaultTryGetItemIndex(tp_trygetitem_index, map, default) \ ((tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithSizeAndGetItemIndexFast ? map(DeeObject_TDefaultTryGetItemIndexWithSizeAndGetItemIndexFast) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithTryGetItem ? map(DeeObject_TDefaultTryGetItemIndexWithTryGetItem) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItemIndex ? map(DeeObject_TDefaultTryGetItemIndexWithGetItemIndex) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItem ? map(DeeObject_TDefaultTryGetItemIndexWithGetItem) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItemIndexDefault ? map(DeeObject_TDefaultTryGetItemIndexWithGetItemIndexDefault) : \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPair ? map(DeeMap_TDefaultTryGetItemIndexWithForeachPair) : \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPairDefault ? map(DeeMap_TDefaultTryGetItemIndexWithForeachPairDefault) : default) + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerate ? map(DeeMap_TDefaultTryGetItemIndexWithEnumerate) : \ + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerateDefault ? map(DeeMap_TDefaultTryGetItemIndexWithEnumerateDefault) : default) #define DeeType_MapDefaultTryGetItemStringHash(tp_trygetitem_string_hash, map, default) \ ((tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemStringLenHash ? map(DeeObject_TDefaultTryGetItemStringHashWithTryGetItemStringLenHash) : \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItem ? map(DeeObject_TDefaultTryGetItemStringHashWithTryGetItem) : \ @@ -3057,8 +3164,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithGetItemStringLenHash ? map(DeeObject_TDefaultTryGetItemStringHashWithGetItemStringLenHash) : \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithGetItem ? map(DeeObject_TDefaultTryGetItemStringHashWithGetItem) : \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemDefault ? map(DeeObject_TDefaultTryGetItemStringHashWithTryGetItemDefault) : \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPair ? map(DeeMap_TDefaultTryGetItemStringHashWithForeachPair) : \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPairDefault ? map(DeeMap_TDefaultTryGetItemStringHashWithForeachPairDefault) : default) + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerate ? map(DeeMap_TDefaultTryGetItemStringHashWithEnumerate) : \ + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerateDefault ? map(DeeMap_TDefaultTryGetItemStringHashWithEnumerateDefault) : default) #define DeeType_MapDefaultTryGetItemStringLenHash(tp_trygetitem_string_len_hash, map, default) \ ((tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemStringHash ? map(DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemStringHash) : \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItem ? map(DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItem) : \ @@ -3066,8 +3173,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithGetItemStringHash ? map(DeeObject_TDefaultTryGetItemStringLenHashWithGetItemStringHash) : \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithGetItem ? map(DeeObject_TDefaultTryGetItemStringLenHashWithGetItem) : \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemDefault ? map(DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemDefault) : \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPair ? map(DeeMap_TDefaultTryGetItemStringLenHashWithForeachPair) : \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPairDefault ? map(DeeMap_TDefaultTryGetItemStringLenHashWithForeachPairDefault) : default) + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerate ? map(DeeMap_TDefaultTryGetItemStringLenHashWithEnumerate) : \ + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerateDefault ? map(DeeMap_TDefaultTryGetItemStringLenHashWithEnumerateDefault) : default) #define DeeType_MapDefaultDelItem(tp_delitem, map, default) \ ((tp_delitem) == &DeeObject_DefaultDelItemWithDelItemIndex ? map(DeeObject_TDefaultDelItemWithDelItemIndex) : \ (tp_delitem) == &DeeObject_DefaultDelItemWithDelItemIndexDefault ? map(DeeObject_TDefaultDelItemWithDelItemIndexDefault) : \ @@ -3116,8 +3223,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem) == &DeeObject_DefaultBoundItemWithTryGetItemStringHash ? map(DeeObject_TDefaultBoundItemWithTryGetItemStringHash) : \ (tp_bounditem) == &DeeObject_DefaultBoundItemWithGetItemDefault ? map(DeeObject_TDefaultBoundItemWithGetItemDefault) : \ (tp_bounditem) == &DeeMap_DefaultBoundItemWithContains ? map(DeeMap_TDefaultBoundItemWithContains) : \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPair ? map(DeeMap_TDefaultBoundItemWithForeachPair) : \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPairDefault ? map(DeeMap_TDefaultBoundItemWithForeachPairDefault) : default) + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerate ? map(DeeMap_TDefaultBoundItemWithEnumerate) : \ + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerateDefault ? map(DeeMap_TDefaultBoundItemWithEnumerateDefault) : default) #define DeeType_MapDefaultBoundItemIndex(tp_bounditem_index, map, default) \ ((tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithBoundItem ? map(DeeObject_TDefaultBoundItemIndexWithBoundItem) : \ (tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithSizeAndGetItemIndexFast ? map(DeeObject_TDefaultBoundItemIndexWithSizeAndGetItemIndexFast) : \ @@ -3129,8 +3236,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_index) == &DeeSeq_DefaultBoundItemIndexWithSizeAndTryGetItemIndex ? map(DeeSeq_TDefaultBoundItemIndexWithSizeAndTryGetItemIndex) : \ (tp_bounditem_index) == &DeeSeq_DefaultBoundItemIndexWithTryGetItemAndSizeOb ? map(DeeSeq_TDefaultBoundItemIndexWithTryGetItemAndSizeOb) : \ (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithContains ? map(DeeMap_TDefaultBoundItemIndexWithContains) : \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPair ? map(DeeMap_TDefaultBoundItemIndexWithForeachPair) : \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPairDefault ? map(DeeMap_TDefaultBoundItemIndexWithForeachPairDefault) : default) + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerate ? map(DeeMap_TDefaultBoundItemIndexWithEnumerate) : \ + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerateDefault ? map(DeeMap_TDefaultBoundItemIndexWithEnumerateDefault) : default) #define DeeType_MapDefaultBoundItemStringHash(tp_bounditem_string_hash, map, default) \ ((tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemStringLenHash ? map(DeeObject_TDefaultBoundItemStringHashWithBoundItemStringLenHash) : \ (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItem ? map(DeeObject_TDefaultBoundItemStringHashWithBoundItem) : \ @@ -3145,8 +3252,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithTryGetItem ? map(DeeObject_TDefaultBoundItemStringHashWithTryGetItem) : \ (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemDefault ? map(DeeObject_TDefaultBoundItemStringHashWithBoundItemDefault) : \ (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithContains ? map(DeeMap_TDefaultBoundItemStringHashWithContains) : \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPair ? map(DeeMap_TDefaultBoundItemStringHashWithForeachPair) : \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPairDefault ? map(DeeMap_TDefaultBoundItemStringHashWithForeachPairDefault) : default) + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerate ? map(DeeMap_TDefaultBoundItemStringHashWithEnumerate) : \ + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerateDefault ? map(DeeMap_TDefaultBoundItemStringHashWithEnumerateDefault) : default) #define DeeType_MapDefaultBoundItemStringLenHash(tp_bounditem_string_len_hash, map, default) \ ((tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemStringHash ? map(DeeObject_TDefaultBoundItemStringLenHashWithBoundItemStringHash) : \ (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItem ? map(DeeObject_TDefaultBoundItemStringLenHashWithBoundItem) : \ @@ -3161,8 +3268,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithTryGetItem ? map(DeeObject_TDefaultBoundItemStringLenHashWithTryGetItem) : \ (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemDefault ? map(DeeObject_TDefaultBoundItemStringLenHashWithBoundItemDefault) : \ (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithContains ? map(DeeMap_TDefaultBoundItemStringLenHashWithContains) : \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPair ? map(DeeMap_TDefaultBoundItemStringLenHashWithForeachPair) : \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPairDefault ? map(DeeMap_TDefaultBoundItemStringLenHashWithForeachPairDefault) : default) + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerate ? map(DeeMap_TDefaultBoundItemStringLenHashWithEnumerate) : \ + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerateDefault ? map(DeeMap_TDefaultBoundItemStringLenHashWithEnumerateDefault) : default) #define DeeType_MapDefaultHasItem(tp_hasitem, map, default) \ ((tp_hasitem) == &DeeObject_DefaultHasItemWithHasItemStringHash ? map(DeeObject_TDefaultHasItemWithHasItemStringHash) : \ (tp_hasitem) == &DeeObject_DefaultHasItemWithHasItemStringLenHash ? map(DeeObject_TDefaultHasItemWithHasItemStringLenHash) : \ @@ -3183,8 +3290,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem) == &DeeSeq_DefaultHasItemWithSize ? map(DeeSeq_TDefaultHasItemWithSize) : \ (tp_hasitem) == &DeeSeq_DefaultHasItemWithSizeOb ? map(DeeSeq_TDefaultHasItemWithSizeOb) : \ (tp_hasitem) == &DeeMap_DefaultHasItemWithContains ? map(DeeMap_TDefaultHasItemWithContains) : \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPair ? map(DeeMap_TDefaultHasItemWithForeachPair) : \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPairDefault ? map(DeeMap_TDefaultHasItemWithForeachPairDefault) : default) + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerate ? map(DeeMap_TDefaultHasItemWithEnumerate) : \ + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerateDefault ? map(DeeMap_TDefaultHasItemWithEnumerateDefault) : default) #define DeeType_MapDefaultHasItemIndex(tp_hasitem_index, map, default) \ ((tp_hasitem_index) == &DeeObject_DefaultHasItemIndexWithHasItem ? map(DeeObject_TDefaultHasItemIndexWithHasItem) : \ (tp_hasitem_index) == &DeeObject_DefaultHasItemIndexWithBoundItemIndex ? map(DeeObject_TDefaultHasItemIndexWithBoundItemIndex) : \ @@ -3197,8 +3304,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSize ? map(DeeSeq_TDefaultHasItemIndexWithSize) : \ (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSizeDefault ? map(DeeSeq_TDefaultHasItemIndexWithSizeDefault) : \ (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithContains ? map(DeeMap_TDefaultHasItemIndexWithContains) : \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPair ? map(DeeMap_TDefaultHasItemIndexWithForeachPair) : \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPairDefault ? map(DeeMap_TDefaultHasItemIndexWithForeachPairDefault) : default) + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerate ? map(DeeMap_TDefaultHasItemIndexWithEnumerate) : \ + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerateDefault ? map(DeeMap_TDefaultHasItemIndexWithEnumerateDefault) : default) #define DeeType_MapDefaultHasItemStringHash(tp_hasitem_string_hash, map, default) \ ((tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemStringLenHash ? map(DeeObject_TDefaultHasItemStringHashWithHasItemStringLenHash) : \ (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithBoundItemStringHash ? map(DeeObject_TDefaultHasItemStringHashWithBoundItemStringHash) : \ @@ -3213,8 +3320,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithGetItem ? map(DeeObject_TDefaultHasItemStringHashWithGetItem) : \ (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemDefault ? map(DeeObject_TDefaultHasItemStringHashWithHasItemDefault) : \ (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithContains ? map(DeeMap_TDefaultHasItemStringHashWithContains) : \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPair ? map(DeeMap_TDefaultHasItemStringHashWithForeachPair) : \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPairDefault ? map(DeeMap_TDefaultHasItemStringHashWithForeachPairDefault) : default) + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerate ? map(DeeMap_TDefaultHasItemStringHashWithEnumerate) : \ + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerateDefault ? map(DeeMap_TDefaultHasItemStringHashWithEnumerateDefault) : default) #define DeeType_MapDefaultHasItemStringLenHash(tp_hasitem_string_len_hash, map, default) \ ((tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemStringHash ? map(DeeObject_TDefaultHasItemStringLenHashWithHasItemStringHash) : \ (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithBoundItemStringLenHash ? map(DeeObject_TDefaultHasItemStringLenHashWithBoundItemStringLenHash) : \ @@ -3229,8 +3336,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithGetItem ? map(DeeObject_TDefaultHasItemStringLenHashWithGetItem) : \ (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemDefault ? map(DeeObject_TDefaultHasItemStringLenHashWithHasItemDefault) : \ (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithContains ? map(DeeMap_TDefaultHasItemStringLenHashWithContains) : \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPair ? map(DeeMap_TDefaultHasItemStringLenHashWithForeachPair) : \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPairDefault ? map(DeeMap_TDefaultHasItemStringLenHashWithForeachPairDefault) : default) + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerate ? map(DeeMap_TDefaultHasItemStringLenHashWithEnumerate) : \ + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerateDefault ? map(DeeMap_TDefaultHasItemStringLenHashWithEnumerateDefault) : default) #define DeeType_MapDefaultGetRange(tp_getrange, map, default) \ ((tp_getrange) == &DeeObject_DefaultGetRangeWithGetRangeIndexAndGetRangeIndexN ? map(DeeObject_TDefaultGetRangeWithGetRangeIndexAndGetRangeIndexN) : \ (tp_getrange) == &DeeObject_DefaultGetRangeWithGetRangeIndexDefaultAndGetRangeIndexNDefault ? map(DeeObject_TDefaultGetRangeWithGetRangeIndexDefaultAndGetRangeIndexNDefault) : \ @@ -3473,6 +3580,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz #define DeeType_IsDefaultIter(tp_iter) \ ((tp_iter) == &DeeObject_DefaultIterWithForeach || \ (tp_iter) == &DeeObject_DefaultIterWithForeachPair || \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerate || \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerateIndex || \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndexFast || \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndTryGetItemIndex || \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndex || \ @@ -3481,6 +3590,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_iter) == &DeeSeq_DefaultIterWithGetItem) #define DeeType_IsDefaultForeach(tp_foreach) \ ((tp_foreach) == &DeeObject_DefaultForeachWithIter || \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerate || \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerateIndex || \ (tp_foreach) == &DeeObject_DefaultForeachWithForeachPair || \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndGetItemIndexFast || \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndTryGetItemIndex || \ @@ -3490,13 +3601,42 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_foreach) == &DeeSeq_DefaultForeachWithGetItemIndexDefault) #define DeeType_IsDefaultForeachPair(tp_foreach_pair) \ ((tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeach || \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerate || \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerateIndex || \ (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeachDefault || \ - (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithIter) + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithIter || \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerate || \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerateIndex) +#define DeeType_IsDefaultEnumerate(tp_enumerate) \ + ((tp_enumerate) == &DeeObject_DefaultEnumerateWithEnumerateIndex || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndexFast || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndTryGetItemIndex || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndex || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeObAndGetItem || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeach || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndIter || \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithForeachPairDefault || \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithIter || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault || \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeachDefault) +#define DeeType_IsDefaultEnumerateIndex(tp_enumerate_index) \ + ((tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerate || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndexFast || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndTryGetItemIndex || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndex || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeObAndGetItem || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeach || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndIter || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault || \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeachDefault || \ + (tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerateDefault) #define DeeType_IsDefaultSizeOb(tp_sizeob) \ ((tp_sizeob) == &DeeObject_DefaultSizeObWithSize || \ (tp_sizeob) == &DeeObject_DefaultSizeObWithSizeDefault) #define DeeType_IsDefaultSize(tp_size) \ ((tp_size) == &DeeObject_DefaultSizeWithSizeOb || \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerateIndex || \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerate || \ (tp_size) == &DeeSeq_DefaultSizeWithForeachPair || \ (tp_size) == &DeeSeq_DefaultSizeWithForeach || \ (tp_size) == &DeeSeq_DefaultSizeWithIter) @@ -3520,8 +3660,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringHash || \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringLenHash || \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemIndex || \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachPair || \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachDefault) + (tp_contains) == &DeeMap_DefaultContainsWithEnumerate || \ + (tp_contains) == &DeeMap_DefaultContainsWithEnumerateDefault) #define DeeType_IsDefaultGetItem(tp_getitem) \ ((tp_getitem) == &DeeObject_DefaultGetItemWithSizeAndGetItemIndexFast || \ (tp_getitem) == &DeeObject_DefaultGetItemWithGetItemIndex || \ @@ -3536,8 +3676,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem) == &DeeSeq_DefaultGetItemWithTryGetItemAndSize || \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndexOb || \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndex || \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPair || \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPairDefault) + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerate || \ + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerateDefault) #define DeeType_IsDefaultGetItemIndex(tp_getitem_index) \ ((tp_getitem_index) == &DeeObject_DefaultGetItemIndexWithSizeAndGetItemIndexFast || \ (tp_getitem_index) == &DeeObject_DefaultGetItemIndexWithTryGetItemIndex || \ @@ -3550,8 +3690,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSize || \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSizeOb || \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithForeachDefault || \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPair || \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPairDefault) + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerate || \ + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerateDefault) #define DeeType_IsDefaultGetItemStringHash(tp_getitem_string_hash) \ ((tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemStringLenHash || \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItem || \ @@ -3560,8 +3700,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithTryGetItem || \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithErrorRequiresInt || \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemDefault || \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPair || \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPairDefault) + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerate || \ + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerateDefault) #define DeeType_IsDefaultGetItemStringLenHash(tp_getitem_string_len_hash) \ ((tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemStringHash || \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItem || \ @@ -3570,8 +3710,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithTryGetItem || \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithErrorRequiresInt || \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemDefault || \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPair || \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPairDefault) + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerate || \ + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerateDefault) #define DeeType_IsDefaultTryGetItem(tp_trygetitem) \ ((tp_trygetitem) == &DeeObject_DefaultTryGetItemWithTryGetItemIndex || \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithTryGetItemStringHash || \ @@ -3582,8 +3722,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringHash || \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringLenHash || \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemDefault || \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPair || \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPairDefault) + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerate || \ + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerateDefault) #define DeeType_IsDefaultTryGetItemIndex(tp_trygetitem_index) \ ((tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithSizeAndGetItemIndexFast || \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithTryGetItem || \ @@ -3591,8 +3731,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItem || \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithErrorRequiresString || \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItemIndexDefault || \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPair || \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPairDefault) + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerate || \ + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerateDefault) #define DeeType_IsDefaultTryGetItemStringHash(tp_trygetitem_string_hash) \ ((tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemStringLenHash || \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItem || \ @@ -3601,8 +3741,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithGetItem || \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithErrorRequiresInt || \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemDefault || \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPair || \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPairDefault) + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerate || \ + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerateDefault) #define DeeType_IsDefaultTryGetItemStringLenHash(tp_trygetitem_string_len_hash) \ ((tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemStringHash || \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItem || \ @@ -3611,8 +3751,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithGetItem || \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithErrorRequiresInt || \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemDefault || \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPair || \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPairDefault) + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerate || \ + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerateDefault) #define DeeType_IsDefaultDelItem(tp_delitem) \ ((tp_delitem) == &DeeObject_DefaultDelItemWithDelItemIndex || \ (tp_delitem) == &DeeObject_DefaultDelItemWithDelItemIndexDefault || \ @@ -3667,8 +3807,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem) == &DeeObject_DefaultBoundItemWithTryGetItemStringHash || \ (tp_bounditem) == &DeeObject_DefaultBoundItemWithGetItemDefault || \ (tp_bounditem) == &DeeMap_DefaultBoundItemWithContains || \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPair || \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPairDefault) + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerate || \ + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerateDefault) #define DeeType_IsDefaultBoundItemIndex(tp_bounditem_index) \ ((tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithBoundItem || \ (tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithSizeAndGetItemIndexFast || \ @@ -3681,8 +3821,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_index) == &DeeSeq_DefaultBoundItemIndexWithTryGetItemAndSizeOb || \ (tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithErrorRequiresString || \ (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithContains || \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPair || \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPairDefault) + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerate || \ + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerateDefault) #define DeeType_IsDefaultBoundItemStringHash(tp_bounditem_string_hash) \ ((tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemStringLenHash || \ (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItem || \ @@ -3698,8 +3838,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemDefault || \ (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithErrorRequiresInt || \ (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithContains || \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPair || \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPairDefault) + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerate || \ + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerateDefault) #define DeeType_IsDefaultBoundItemStringLenHash(tp_bounditem_string_len_hash) \ ((tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemStringHash || \ (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItem || \ @@ -3715,8 +3855,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemDefault || \ (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithErrorRequiresInt || \ (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithContains || \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPair || \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPairDefault) + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerate || \ + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerateDefault) #define DeeType_IsDefaultHasItem(tp_hasitem) \ ((tp_hasitem) == &DeeObject_DefaultHasItemWithHasItemStringHash || \ (tp_hasitem) == &DeeObject_DefaultHasItemWithHasItemStringLenHash || \ @@ -3737,8 +3877,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem) == &DeeSeq_DefaultHasItemWithSize || \ (tp_hasitem) == &DeeSeq_DefaultHasItemWithSizeOb || \ (tp_hasitem) == &DeeMap_DefaultHasItemWithContains || \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPair || \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPairDefault) + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerate || \ + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerateDefault) #define DeeType_IsDefaultHasItemIndex(tp_hasitem_index) \ ((tp_hasitem_index) == &DeeObject_DefaultHasItemIndexWithHasItem || \ (tp_hasitem_index) == &DeeObject_DefaultHasItemIndexWithBoundItemIndex || \ @@ -3752,8 +3892,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSize || \ (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSizeDefault || \ (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithContains || \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPair || \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPairDefault) + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerate || \ + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerateDefault) #define DeeType_IsDefaultHasItemStringHash(tp_hasitem_string_hash) \ ((tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemStringLenHash || \ (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithBoundItemStringHash || \ @@ -3769,8 +3909,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemDefault || \ (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithErrorRequiresInt || \ (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithContains || \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPair || \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPairDefault) + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerate || \ + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerateDefault) #define DeeType_IsDefaultHasItemStringLenHash(tp_hasitem_string_len_hash) \ ((tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemStringHash || \ (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithBoundItemStringLenHash || \ @@ -3786,8 +3926,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemDefault || \ (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithErrorRequiresInt || \ (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithContains || \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPair || \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPairDefault) + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerate || \ + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerateDefault) #define DeeType_IsDefaultGetRange(tp_getrange) \ ((tp_getrange) == &DeeObject_DefaultGetRangeWithGetRangeIndexAndGetRangeIndexN || \ (tp_getrange) == &DeeObject_DefaultGetRangeWithGetRangeIndexDefaultAndGetRangeIndexNDefault || \ @@ -4075,6 +4215,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz #define DeeType_invoke_seq_tp_iter_DEFAULT(tp_self, tp_iter, self, default) \ ((tp_iter) == &DeeObject_DefaultIterWithForeach ? DeeObject_TDefaultIterWithForeach(tp_self, self) : \ (tp_iter) == &DeeObject_DefaultIterWithForeachPair ? DeeObject_TDefaultIterWithForeachPair(tp_self, self) : \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerate ? DeeObject_TDefaultIterWithEnumerate(tp_self, self) : \ + (tp_iter) == &DeeObject_DefaultIterWithEnumerateIndex ? DeeObject_TDefaultIterWithEnumerateIndex(tp_self, self) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndexFast ? DeeSeq_TDefaultIterWithSizeAndGetItemIndexFast(tp_self, self) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultIterWithSizeAndTryGetItemIndex(tp_self, self) : \ (tp_iter) == &DeeSeq_DefaultIterWithSizeAndGetItemIndex ? DeeSeq_TDefaultIterWithSizeAndGetItemIndex(tp_self, self) : \ @@ -4084,6 +4226,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz default) #define DeeType_invoke_seq_tp_foreach_DEFAULT(tp_self, tp_foreach, self, proc, arg, default) \ ((tp_foreach) == &DeeObject_DefaultForeachWithIter ? DeeObject_TDefaultForeachWithIter(tp_self, self, proc, arg) : \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerate ? DeeObject_TDefaultForeachWithEnumerate(tp_self, self, proc, arg) : \ + (tp_foreach) == &DeeObject_DefaultForeachWithEnumerateIndex ? DeeObject_TDefaultForeachWithEnumerateIndex(tp_self, self, proc, arg) : \ (tp_foreach) == &DeeObject_DefaultForeachWithForeachPair ? DeeObject_TDefaultForeachWithForeachPair(tp_self, self, proc, arg) : \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndGetItemIndexFast ? DeeSeq_TDefaultForeachWithSizeAndGetItemIndexFast(tp_self, self, proc, arg) : \ (tp_foreach) == &DeeSeq_DefaultForeachWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultForeachWithSizeAndTryGetItemIndex(tp_self, self, proc, arg) : \ @@ -4094,8 +4238,37 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz default) #define DeeType_invoke_seq_tp_foreach_pair_DEFAULT(tp_self, tp_foreach_pair, self, proc, arg, default) \ ((tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeach ? DeeObject_TDefaultForeachPairWithForeach(tp_self, self, proc, arg) : \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerate ? DeeObject_TDefaultForeachPairWithEnumerate(tp_self, self, proc, arg) : \ + (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithEnumerateIndex ? DeeObject_TDefaultForeachPairWithEnumerateIndex(tp_self, self, proc, arg) : \ (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithForeachDefault ? DeeObject_TDefaultForeachPairWithForeachDefault(tp_self, self, proc, arg) : \ (tp_foreach_pair) == &DeeObject_DefaultForeachPairWithIter ? DeeObject_TDefaultForeachPairWithIter(tp_self, self, proc, arg) : \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerate ? DeeMap_TDefaultForeachPairWithEnumerate(tp_self, self, proc, arg) : \ + (tp_foreach_pair) == &DeeMap_DefaultForeachPairWithEnumerateIndex ? DeeMap_TDefaultForeachPairWithEnumerateIndex(tp_self, self, proc, arg) : \ + default) +#define DeeType_invoke_seq_tp_enumerate_DEFAULT(tp_self, tp_enumerate, self, proc, arg, default) \ + ((tp_enumerate) == &DeeObject_DefaultEnumerateWithEnumerateIndex ? DeeObject_TDefaultEnumerateWithEnumerateIndex(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndexFast ? DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndexFast(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultEnumerateWithSizeAndTryGetItemIndex(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndex ? DeeSeq_TDefaultEnumerateWithSizeAndGetItemIndex(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeObAndGetItem ? DeeSeq_TDefaultEnumerateWithSizeObAndGetItem(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeach ? DeeSeq_TDefaultEnumerateWithCounterAndForeach(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndIter ? DeeSeq_TDefaultEnumerateWithCounterAndIter(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithForeachPairDefault ? DeeMap_TDefaultEnumerateWithForeachPairDefault(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeMap_DefaultEnumerateWithIter ? DeeMap_TDefaultEnumerateWithIter(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault ? DeeSeq_TDefaultEnumerateWithSizeDefaultAndGetItemIndexDefault(tp_self, self, proc, arg) : \ + (tp_enumerate) == &DeeSeq_DefaultEnumerateWithCounterAndForeachDefault ? DeeSeq_TDefaultEnumerateWithCounterAndForeachDefault(tp_self, self, proc, arg) : \ + default) +#define DeeType_invoke_seq_tp_enumerate_index_DEFAULT(tp_self, tp_enumerate_index, self, proc, arg, starthint, endhint, default) \ + ((tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerate ? DeeObject_TDefaultEnumerateIndexWithEnumerate(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndexFast ? DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndexFast(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultEnumerateIndexWithSizeAndTryGetItemIndex(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndex ? DeeSeq_TDefaultEnumerateIndexWithSizeAndGetItemIndex(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeObAndGetItem ? DeeSeq_TDefaultEnumerateIndexWithSizeObAndGetItem(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeach ? DeeSeq_TDefaultEnumerateIndexWithCounterAndForeach(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndIter ? DeeSeq_TDefaultEnumerateIndexWithCounterAndIter(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault ? DeeSeq_TDefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeSeq_DefaultEnumerateIndexWithCounterAndForeachDefault ? DeeSeq_TDefaultEnumerateIndexWithCounterAndForeachDefault(tp_self, self, proc, arg, starthint, endhint) : \ + (tp_enumerate_index) == &DeeObject_DefaultEnumerateIndexWithEnumerateDefault ? DeeObject_TDefaultEnumerateIndexWithEnumerateDefault(tp_self, self, proc, arg, starthint, endhint) : \ default) #define DeeType_invoke_seq_tp_sizeob_DEFAULT(tp_self, tp_sizeob, self, default) \ ((tp_sizeob) == &DeeObject_DefaultSizeObWithSize ? DeeObject_TDefaultSizeObWithSize(tp_self, self) : \ @@ -4103,6 +4276,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz default) #define DeeType_invoke_seq_tp_size_DEFAULT(tp_self, tp_size, self, default) \ ((tp_size) == &DeeObject_DefaultSizeWithSizeOb ? DeeObject_TDefaultSizeWithSizeOb(tp_self, self) : \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerateIndex ? DeeSeq_TDefaultSizeWithEnumerateIndex(tp_self, self) : \ + (tp_size) == &DeeSeq_DefaultSizeWithEnumerate ? DeeSeq_TDefaultSizeWithEnumerate(tp_self, self) : \ (tp_size) == &DeeSeq_DefaultSizeWithForeachPair ? DeeSeq_TDefaultSizeWithForeachPair(tp_self, self) : \ (tp_size) == &DeeSeq_DefaultSizeWithForeach ? DeeSeq_TDefaultSizeWithForeach(tp_self, self) : \ (tp_size) == &DeeSeq_DefaultSizeWithIter ? DeeSeq_TDefaultSizeWithIter(tp_self, self) : \ @@ -4126,8 +4301,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringHash ? DeeMap_TDefaultContainsWithGetItemStringHash(tp_self, self, elem) : \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemStringLenHash ? DeeMap_TDefaultContainsWithGetItemStringLenHash(tp_self, self, elem) : \ (tp_contains) == &DeeMap_DefaultContainsWithGetItemIndex ? DeeMap_TDefaultContainsWithGetItemIndex(tp_self, self, elem) : \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachPair ? DeeMap_TDefaultContainsWithForeachPair(tp_self, self, elem) : \ - (tp_contains) == &DeeMap_DefaultContainsWithForeachDefault ? DeeMap_TDefaultContainsWithForeachDefault(tp_self, self, elem) : \ + (tp_contains) == &DeeMap_DefaultContainsWithEnumerate ? DeeMap_TDefaultContainsWithEnumerate(tp_self, self, elem) : \ + (tp_contains) == &DeeMap_DefaultContainsWithEnumerateDefault ? DeeMap_TDefaultContainsWithEnumerateDefault(tp_self, self, elem) : \ default) #define DeeType_invoke_seq_tp_getitem_DEFAULT(tp_self, tp_getitem, self, index, default) \ ((tp_getitem) == &DeeObject_DefaultGetItemWithSizeAndGetItemIndexFast ? DeeObject_TDefaultGetItemWithSizeAndGetItemIndexFast(tp_self, self, index) : \ @@ -4143,8 +4318,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem) == &DeeSeq_DefaultGetItemWithTryGetItemAndSize ? DeeSeq_TDefaultGetItemWithTryGetItemAndSize(tp_self, self, index) : \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndexOb ? DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndexOb(tp_self, self, index) : \ (tp_getitem) == &DeeSeq_DefaultGetItemWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultGetItemWithSizeAndTryGetItemIndex(tp_self, self, index) : \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPair ? DeeMap_TDefaultGetItemWithForeachPair(tp_self, self, index) : \ - (tp_getitem) == &DeeMap_DefaultGetItemWithForeachPairDefault ? DeeMap_TDefaultGetItemWithForeachPairDefault(tp_self, self, index) : \ + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerate ? DeeMap_TDefaultGetItemWithEnumerate(tp_self, self, index) : \ + (tp_getitem) == &DeeMap_DefaultGetItemWithEnumerateDefault ? DeeMap_TDefaultGetItemWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_getitem_index_DEFAULT(tp_self, tp_getitem_index, self, index, default) \ ((tp_getitem_index) == &DeeObject_DefaultGetItemIndexWithSizeAndGetItemIndexFast ? DeeObject_TDefaultGetItemIndexWithSizeAndGetItemIndexFast(tp_self, self, index) : \ @@ -4157,8 +4332,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSize ? DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSize(tp_self, self, index) : \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithTryGetItemAndSizeOb ? DeeSeq_TDefaultGetItemIndexWithTryGetItemAndSizeOb(tp_self, self, index) : \ (tp_getitem_index) == &DeeSeq_DefaultGetItemIndexWithForeachDefault ? DeeSeq_TDefaultGetItemIndexWithForeachDefault(tp_self, self, index) : \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPair ? DeeMap_TDefaultGetItemIndexWithForeachPair(tp_self, self, index) : \ - (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithForeachPairDefault ? DeeMap_TDefaultGetItemIndexWithForeachPairDefault(tp_self, self, index) : \ + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerate ? DeeMap_TDefaultGetItemIndexWithEnumerate(tp_self, self, index) : \ + (tp_getitem_index) == &DeeMap_DefaultGetItemIndexWithEnumerateDefault ? DeeMap_TDefaultGetItemIndexWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_getitem_string_hash_DEFAULT(tp_self, tp_getitem_string_hash, self, key, hash, default) \ ((tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemStringLenHash ? DeeObject_TDefaultGetItemStringHashWithGetItemStringLenHash(tp_self, self, key, hash) : \ @@ -4167,8 +4342,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithTryGetItemStringLenHash ? DeeObject_TDefaultGetItemStringHashWithTryGetItemStringLenHash(tp_self, self, key, hash) : \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithTryGetItem ? DeeObject_TDefaultGetItemStringHashWithTryGetItem(tp_self, self, key, hash) : \ (tp_getitem_string_hash) == &DeeObject_DefaultGetItemStringHashWithGetItemDefault ? DeeObject_TDefaultGetItemStringHashWithGetItemDefault(tp_self, self, key, hash) : \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPair ? DeeMap_TDefaultGetItemStringHashWithForeachPair(tp_self, self, key, hash) : \ - (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithForeachPairDefault ? DeeMap_TDefaultGetItemStringHashWithForeachPairDefault(tp_self, self, key, hash) : \ + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerate ? DeeMap_TDefaultGetItemStringHashWithEnumerate(tp_self, self, key, hash) : \ + (tp_getitem_string_hash) == &DeeMap_DefaultGetItemStringHashWithEnumerateDefault ? DeeMap_TDefaultGetItemStringHashWithEnumerateDefault(tp_self, self, key, hash) : \ default) #define DeeType_invoke_seq_tp_getitem_string_len_hash_DEFAULT(tp_self, tp_getitem_string_len_hash, self, key, keylen, hash, default) \ ((tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemStringHash ? DeeObject_TDefaultGetItemStringLenHashWithGetItemStringHash(tp_self, self, key, keylen, hash) : \ @@ -4177,8 +4352,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithTryGetItemStringHash ? DeeObject_TDefaultGetItemStringLenHashWithTryGetItemStringHash(tp_self, self, key, keylen, hash) : \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithTryGetItem ? DeeObject_TDefaultGetItemStringLenHashWithTryGetItem(tp_self, self, key, keylen, hash) : \ (tp_getitem_string_len_hash) == &DeeObject_DefaultGetItemStringLenHashWithGetItemDefault ? DeeObject_TDefaultGetItemStringLenHashWithGetItemDefault(tp_self, self, key, keylen, hash) : \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPair ? DeeMap_TDefaultGetItemStringLenHashWithForeachPair(tp_self, self, key, keylen, hash) : \ - (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithForeachPairDefault ? DeeMap_TDefaultGetItemStringLenHashWithForeachPairDefault(tp_self, self, key, keylen, hash) : \ + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerate ? DeeMap_TDefaultGetItemStringLenHashWithEnumerate(tp_self, self, key, keylen, hash) : \ + (tp_getitem_string_len_hash) == &DeeMap_DefaultGetItemStringLenHashWithEnumerateDefault ? DeeMap_TDefaultGetItemStringLenHashWithEnumerateDefault(tp_self, self, key, keylen, hash) : \ default) #define DeeType_invoke_seq_tp_trygetitem_DEFAULT(tp_self, tp_trygetitem, self, index, default) \ ((tp_trygetitem) == &DeeObject_DefaultTryGetItemWithTryGetItemIndex ? DeeObject_TDefaultTryGetItemWithTryGetItemIndex(tp_self, self, index) : \ @@ -4190,8 +4365,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringHash ? DeeObject_TDefaultTryGetItemWithGetItemStringHash(tp_self, self, index) : \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemStringLenHash ? DeeObject_TDefaultTryGetItemWithGetItemStringLenHash(tp_self, self, index) : \ (tp_trygetitem) == &DeeObject_DefaultTryGetItemWithGetItemDefault ? DeeObject_TDefaultTryGetItemWithGetItemDefault(tp_self, self, index) : \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPair ? DeeMap_TDefaultTryGetItemWithForeachPair(tp_self, self, index) : \ - (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithForeachPairDefault ? DeeMap_TDefaultTryGetItemWithForeachPairDefault(tp_self, self, index) : \ + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerate ? DeeMap_TDefaultTryGetItemWithEnumerate(tp_self, self, index) : \ + (tp_trygetitem) == &DeeMap_DefaultTryGetItemWithEnumerateDefault ? DeeMap_TDefaultTryGetItemWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_trygetitem_index_DEFAULT(tp_self, tp_trygetitem_index, self, index, default) \ ((tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithSizeAndGetItemIndexFast ? DeeObject_TDefaultTryGetItemIndexWithSizeAndGetItemIndexFast(tp_self, self, index) : \ @@ -4199,8 +4374,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItemIndex ? DeeObject_TDefaultTryGetItemIndexWithGetItemIndex(tp_self, self, index) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItem ? DeeObject_TDefaultTryGetItemIndexWithGetItem(tp_self, self, index) : \ (tp_trygetitem_index) == &DeeObject_DefaultTryGetItemIndexWithGetItemIndexDefault ? DeeObject_TDefaultTryGetItemIndexWithGetItemIndexDefault(tp_self, self, index) : \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPair ? DeeMap_TDefaultTryGetItemIndexWithForeachPair(tp_self, self, index) : \ - (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithForeachPairDefault ? DeeMap_TDefaultTryGetItemIndexWithForeachPairDefault(tp_self, self, index) : \ + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerate ? DeeMap_TDefaultTryGetItemIndexWithEnumerate(tp_self, self, index) : \ + (tp_trygetitem_index) == &DeeMap_DefaultTryGetItemIndexWithEnumerateDefault ? DeeMap_TDefaultTryGetItemIndexWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_trygetitem_string_hash_DEFAULT(tp_self, tp_trygetitem_string_hash, self, key, hash, default) \ ((tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemStringLenHash ? DeeObject_TDefaultTryGetItemStringHashWithTryGetItemStringLenHash(tp_self, self, key, hash) : \ @@ -4209,8 +4384,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithGetItemStringLenHash ? DeeObject_TDefaultTryGetItemStringHashWithGetItemStringLenHash(tp_self, self, key, hash) : \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithGetItem ? DeeObject_TDefaultTryGetItemStringHashWithGetItem(tp_self, self, key, hash) : \ (tp_trygetitem_string_hash) == &DeeObject_DefaultTryGetItemStringHashWithTryGetItemDefault ? DeeObject_TDefaultTryGetItemStringHashWithTryGetItemDefault(tp_self, self, key, hash) : \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPair ? DeeMap_TDefaultTryGetItemStringHashWithForeachPair(tp_self, self, key, hash) : \ - (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithForeachPairDefault ? DeeMap_TDefaultTryGetItemStringHashWithForeachPairDefault(tp_self, self, key, hash) : \ + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerate ? DeeMap_TDefaultTryGetItemStringHashWithEnumerate(tp_self, self, key, hash) : \ + (tp_trygetitem_string_hash) == &DeeMap_DefaultTryGetItemStringHashWithEnumerateDefault ? DeeMap_TDefaultTryGetItemStringHashWithEnumerateDefault(tp_self, self, key, hash) : \ default) #define DeeType_invoke_seq_tp_trygetitem_string_len_hash_DEFAULT(tp_self, tp_trygetitem_string_len_hash, self, key, keylen, hash, default) \ ((tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemStringHash ? DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemStringHash(tp_self, self, key, keylen, hash) : \ @@ -4219,8 +4394,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithGetItemStringHash ? DeeObject_TDefaultTryGetItemStringLenHashWithGetItemStringHash(tp_self, self, key, keylen, hash) : \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithGetItem ? DeeObject_TDefaultTryGetItemStringLenHashWithGetItem(tp_self, self, key, keylen, hash) : \ (tp_trygetitem_string_len_hash) == &DeeObject_DefaultTryGetItemStringLenHashWithTryGetItemDefault ? DeeObject_TDefaultTryGetItemStringLenHashWithTryGetItemDefault(tp_self, self, key, keylen, hash) : \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPair ? DeeMap_TDefaultTryGetItemStringLenHashWithForeachPair(tp_self, self, key, keylen, hash) : \ - (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithForeachPairDefault ? DeeMap_TDefaultTryGetItemStringLenHashWithForeachPairDefault(tp_self, self, key, keylen, hash) : \ + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerate ? DeeMap_TDefaultTryGetItemStringLenHashWithEnumerate(tp_self, self, key, keylen, hash) : \ + (tp_trygetitem_string_len_hash) == &DeeMap_DefaultTryGetItemStringLenHashWithEnumerateDefault ? DeeMap_TDefaultTryGetItemStringLenHashWithEnumerateDefault(tp_self, self, key, keylen, hash) : \ default) #define DeeType_invoke_seq_tp_delitem_DEFAULT(tp_self, tp_delitem, self, index, default) \ ((tp_delitem) == &DeeObject_DefaultDelItemWithDelItemIndex ? DeeObject_TDefaultDelItemWithDelItemIndex(tp_self, self, index) : \ @@ -4278,8 +4453,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem) == &DeeObject_DefaultBoundItemWithTryGetItemStringHash ? DeeObject_TDefaultBoundItemWithTryGetItemStringHash(tp_self, self, index) : \ (tp_bounditem) == &DeeObject_DefaultBoundItemWithGetItemDefault ? DeeObject_TDefaultBoundItemWithGetItemDefault(tp_self, self, index) : \ (tp_bounditem) == &DeeMap_DefaultBoundItemWithContains ? DeeMap_TDefaultBoundItemWithContains(tp_self, self, index) : \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPair ? DeeMap_TDefaultBoundItemWithForeachPair(tp_self, self, index) : \ - (tp_bounditem) == &DeeMap_DefaultBoundItemWithForeachPairDefault ? DeeMap_TDefaultBoundItemWithForeachPairDefault(tp_self, self, index) : \ + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerate ? DeeMap_TDefaultBoundItemWithEnumerate(tp_self, self, index) : \ + (tp_bounditem) == &DeeMap_DefaultBoundItemWithEnumerateDefault ? DeeMap_TDefaultBoundItemWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_bounditem_index_DEFAULT(tp_self, tp_bounditem_index, self, index, default) \ ((tp_bounditem_index) == &DeeObject_DefaultBoundItemIndexWithBoundItem ? DeeObject_TDefaultBoundItemIndexWithBoundItem(tp_self, self, index) : \ @@ -4292,8 +4467,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_index) == &DeeSeq_DefaultBoundItemIndexWithSizeAndTryGetItemIndex ? DeeSeq_TDefaultBoundItemIndexWithSizeAndTryGetItemIndex(tp_self, self, index) : \ (tp_bounditem_index) == &DeeSeq_DefaultBoundItemIndexWithTryGetItemAndSizeOb ? DeeSeq_TDefaultBoundItemIndexWithTryGetItemAndSizeOb(tp_self, self, index) : \ (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithContains ? DeeMap_TDefaultBoundItemIndexWithContains(tp_self, self, index) : \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPair ? DeeMap_TDefaultBoundItemIndexWithForeachPair(tp_self, self, index) : \ - (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithForeachPairDefault ? DeeMap_TDefaultBoundItemIndexWithForeachPairDefault(tp_self, self, index) : \ + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerate ? DeeMap_TDefaultBoundItemIndexWithEnumerate(tp_self, self, index) : \ + (tp_bounditem_index) == &DeeMap_DefaultBoundItemIndexWithEnumerateDefault ? DeeMap_TDefaultBoundItemIndexWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_bounditem_string_hash_DEFAULT(tp_self, tp_bounditem_string_hash, self, key, hash, default) \ ((tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemStringLenHash ? DeeObject_TDefaultBoundItemStringHashWithBoundItemStringLenHash(tp_self, self, key, hash) : \ @@ -4309,8 +4484,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithTryGetItem ? DeeObject_TDefaultBoundItemStringHashWithTryGetItem(tp_self, self, key, hash) : \ (tp_bounditem_string_hash) == &DeeObject_DefaultBoundItemStringHashWithBoundItemDefault ? DeeObject_TDefaultBoundItemStringHashWithBoundItemDefault(tp_self, self, key, hash) : \ (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithContains ? DeeMap_TDefaultBoundItemStringHashWithContains(tp_self, self, key, hash) : \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPair ? DeeMap_TDefaultBoundItemStringHashWithForeachPair(tp_self, self, key, hash) : \ - (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithForeachPairDefault ? DeeMap_TDefaultBoundItemStringHashWithForeachPairDefault(tp_self, self, key, hash) : \ + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerate ? DeeMap_TDefaultBoundItemStringHashWithEnumerate(tp_self, self, key, hash) : \ + (tp_bounditem_string_hash) == &DeeMap_DefaultBoundItemStringHashWithEnumerateDefault ? DeeMap_TDefaultBoundItemStringHashWithEnumerateDefault(tp_self, self, key, hash) : \ default) #define DeeType_invoke_seq_tp_bounditem_string_len_hash_DEFAULT(tp_self, tp_bounditem_string_len_hash, self, key, keylen, hash, default) \ ((tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemStringHash ? DeeObject_TDefaultBoundItemStringLenHashWithBoundItemStringHash(tp_self, self, key, keylen, hash) : \ @@ -4326,8 +4501,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithTryGetItem ? DeeObject_TDefaultBoundItemStringLenHashWithTryGetItem(tp_self, self, key, keylen, hash) : \ (tp_bounditem_string_len_hash) == &DeeObject_DefaultBoundItemStringLenHashWithBoundItemDefault ? DeeObject_TDefaultBoundItemStringLenHashWithBoundItemDefault(tp_self, self, key, keylen, hash) : \ (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithContains ? DeeMap_TDefaultBoundItemStringLenHashWithContains(tp_self, self, key, keylen, hash) : \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPair ? DeeMap_TDefaultBoundItemStringLenHashWithForeachPair(tp_self, self, key, keylen, hash) : \ - (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithForeachPairDefault ? DeeMap_TDefaultBoundItemStringLenHashWithForeachPairDefault(tp_self, self, key, keylen, hash) : \ + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerate ? DeeMap_TDefaultBoundItemStringLenHashWithEnumerate(tp_self, self, key, keylen, hash) : \ + (tp_bounditem_string_len_hash) == &DeeMap_DefaultBoundItemStringLenHashWithEnumerateDefault ? DeeMap_TDefaultBoundItemStringLenHashWithEnumerateDefault(tp_self, self, key, keylen, hash) : \ default) #define DeeType_invoke_seq_tp_hasitem_DEFAULT(tp_self, tp_hasitem, self, index, default) \ ((tp_hasitem) == &DeeObject_DefaultHasItemWithHasItemStringHash ? DeeObject_TDefaultHasItemWithHasItemStringHash(tp_self, self, index) : \ @@ -4349,8 +4524,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem) == &DeeSeq_DefaultHasItemWithSize ? DeeSeq_TDefaultHasItemWithSize(tp_self, self, index) : \ (tp_hasitem) == &DeeSeq_DefaultHasItemWithSizeOb ? DeeSeq_TDefaultHasItemWithSizeOb(tp_self, self, index) : \ (tp_hasitem) == &DeeMap_DefaultHasItemWithContains ? DeeMap_TDefaultHasItemWithContains(tp_self, self, index) : \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPair ? DeeMap_TDefaultHasItemWithForeachPair(tp_self, self, index) : \ - (tp_hasitem) == &DeeMap_DefaultHasItemWithForeachPairDefault ? DeeMap_TDefaultHasItemWithForeachPairDefault(tp_self, self, index) : \ + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerate ? DeeMap_TDefaultHasItemWithEnumerate(tp_self, self, index) : \ + (tp_hasitem) == &DeeMap_DefaultHasItemWithEnumerateDefault ? DeeMap_TDefaultHasItemWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_hasitem_index_DEFAULT(tp_self, tp_hasitem_index, self, index, default) \ ((tp_hasitem_index) == &DeeObject_DefaultHasItemIndexWithHasItem ? DeeObject_TDefaultHasItemIndexWithHasItem(tp_self, self, index) : \ @@ -4364,8 +4539,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSize ? DeeSeq_TDefaultHasItemIndexWithSize(tp_self, self, index) : \ (tp_hasitem_index) == &DeeSeq_DefaultHasItemIndexWithSizeDefault ? DeeSeq_TDefaultHasItemIndexWithSizeDefault(tp_self, self, index) : \ (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithContains ? DeeMap_TDefaultHasItemIndexWithContains(tp_self, self, index) : \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPair ? DeeMap_TDefaultHasItemIndexWithForeachPair(tp_self, self, index) : \ - (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithForeachPairDefault ? DeeMap_TDefaultHasItemIndexWithForeachPairDefault(tp_self, self, index) : \ + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerate ? DeeMap_TDefaultHasItemIndexWithEnumerate(tp_self, self, index) : \ + (tp_hasitem_index) == &DeeMap_DefaultHasItemIndexWithEnumerateDefault ? DeeMap_TDefaultHasItemIndexWithEnumerateDefault(tp_self, self, index) : \ default) #define DeeType_invoke_seq_tp_hasitem_string_hash_DEFAULT(tp_self, tp_hasitem_string_hash, self, key, hash, default) \ ((tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemStringLenHash ? DeeObject_TDefaultHasItemStringHashWithHasItemStringLenHash(tp_self, self, key, hash) : \ @@ -4381,8 +4556,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithGetItem ? DeeObject_TDefaultHasItemStringHashWithGetItem(tp_self, self, key, hash) : \ (tp_hasitem_string_hash) == &DeeObject_DefaultHasItemStringHashWithHasItemDefault ? DeeObject_TDefaultHasItemStringHashWithHasItemDefault(tp_self, self, key, hash) : \ (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithContains ? DeeMap_TDefaultHasItemStringHashWithContains(tp_self, self, key, hash) : \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPair ? DeeMap_TDefaultHasItemStringHashWithForeachPair(tp_self, self, key, hash) : \ - (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithForeachPairDefault ? DeeMap_TDefaultHasItemStringHashWithForeachPairDefault(tp_self, self, key, hash) : \ + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerate ? DeeMap_TDefaultHasItemStringHashWithEnumerate(tp_self, self, key, hash) : \ + (tp_hasitem_string_hash) == &DeeMap_DefaultHasItemStringHashWithEnumerateDefault ? DeeMap_TDefaultHasItemStringHashWithEnumerateDefault(tp_self, self, key, hash) : \ default) #define DeeType_invoke_seq_tp_hasitem_string_len_hash_DEFAULT(tp_self, tp_hasitem_string_len_hash, self, key, keylen, hash, default) \ ((tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemStringHash ? DeeObject_TDefaultHasItemStringLenHashWithHasItemStringHash(tp_self, self, key, keylen, hash) : \ @@ -4398,8 +4573,8 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithGetItem ? DeeObject_TDefaultHasItemStringLenHashWithGetItem(tp_self, self, key, keylen, hash) : \ (tp_hasitem_string_len_hash) == &DeeObject_DefaultHasItemStringLenHashWithHasItemDefault ? DeeObject_TDefaultHasItemStringLenHashWithHasItemDefault(tp_self, self, key, keylen, hash) : \ (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithContains ? DeeMap_TDefaultHasItemStringLenHashWithContains(tp_self, self, key, keylen, hash) : \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPair ? DeeMap_TDefaultHasItemStringLenHashWithForeachPair(tp_self, self, key, keylen, hash) : \ - (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithForeachPairDefault ? DeeMap_TDefaultHasItemStringLenHashWithForeachPairDefault(tp_self, self, key, keylen, hash) : \ + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerate ? DeeMap_TDefaultHasItemStringLenHashWithEnumerate(tp_self, self, key, keylen, hash) : \ + (tp_hasitem_string_len_hash) == &DeeMap_DefaultHasItemStringLenHashWithEnumerateDefault ? DeeMap_TDefaultHasItemStringLenHashWithEnumerateDefault(tp_self, self, key, keylen, hash) : \ default) #define DeeType_invoke_seq_tp_getrange_DEFAULT(tp_self, tp_getrange, self, start, end, default) \ ((tp_getrange) == &DeeObject_DefaultGetRangeWithGetRangeIndexAndGetRangeIndexN ? DeeObject_TDefaultGetRangeWithGetRangeIndexAndGetRangeIndexN(tp_self, self, start, end) : \ @@ -4560,6 +4735,10 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz DeeType_invoke_seq_tp_foreach_DEFAULT(tp_self, tp_foreach, self, proc, arg, DeeType_invoke_seq_tp_foreach_NODEFAULT(tp_self, tp_foreach, self, proc, arg)) #define DeeType_invoke_seq_tp_foreach_pair(tp_self, tp_foreach_pair, self, proc, arg) \ DeeType_invoke_seq_tp_foreach_pair_DEFAULT(tp_self, tp_foreach_pair, self, proc, arg, DeeType_invoke_seq_tp_foreach_pair_NODEFAULT(tp_self, tp_foreach_pair, self, proc, arg)) +#define DeeType_invoke_seq_tp_enumerate(tp_self, tp_enumerate, self, proc, arg) \ + DeeType_invoke_seq_tp_enumerate_DEFAULT(tp_self, tp_enumerate, self, proc, arg, DeeType_invoke_seq_tp_enumerate_NODEFAULT(tp_self, tp_enumerate, self, proc, arg)) +#define DeeType_invoke_seq_tp_enumerate_index(tp_self, tp_enumerate_index, self, proc, arg, starthint, endhint) \ + DeeType_invoke_seq_tp_enumerate_index_DEFAULT(tp_self, tp_enumerate_index, self, proc, arg, starthint, endhint, DeeType_invoke_seq_tp_enumerate_index_NODEFAULT(tp_self, tp_enumerate_index, self, proc, arg, starthint, endhint)) #define DeeType_invoke_seq_tp_sizeob(tp_self, tp_sizeob, self) \ DeeType_invoke_seq_tp_sizeob_DEFAULT(tp_self, tp_sizeob, self, DeeType_invoke_seq_tp_sizeob_NODEFAULT(tp_self, tp_sizeob, self)) #define DeeType_invoke_seq_tp_size(tp_self, tp_size, self) \ @@ -4796,6 +4975,10 @@ INTDEF WUNUSED NONNULL((1, 2, 4)) int DCALL DeeSeq_TDefaultSetRangeIndexNWithSiz #define DeeType_InvokeSeqForeach_NODEFAULT(tp_self, self, proc, arg) DeeType_invoke_seq_tp_foreach_NODEFAULT(tp_self, (tp_self)->tp_seq->tp_foreach, self, proc, arg) #define DeeType_InvokeSeqForeachPair(tp_self, self, proc, arg) DeeType_invoke_seq_tp_foreach_pair(tp_self, (tp_self)->tp_seq->tp_foreach_pair, self, proc, arg) #define DeeType_InvokeSeqForeachPair_NODEFAULT(tp_self, self, proc, arg) DeeType_invoke_seq_tp_foreach_pair_NODEFAULT(tp_self, (tp_self)->tp_seq->tp_foreach_pair, self, proc, arg) +#define DeeType_InvokeSeqEnumerate(tp_self, self, proc, arg) DeeType_invoke_seq_tp_enumerate(tp_self, (tp_self)->tp_seq->tp_enumerate, self, proc, arg) +#define DeeType_InvokeSeqEnumerate_NODEFAULT(tp_self, self, proc, arg) DeeType_invoke_seq_tp_enumerate_NODEFAULT(tp_self, (tp_self)->tp_seq->tp_enumerate, self, proc, arg) +#define DeeType_InvokeSeqEnumerateIndex(tp_self, self, proc, arg, starthint, endhint) DeeType_invoke_seq_tp_enumerate_index(tp_self, (tp_self)->tp_seq->tp_enumerate_index, self, proc, arg, starthint, endhint) +#define DeeType_InvokeSeqEnumerateIndex_NODEFAULT(tp_self, self, proc, arg, starthint, endhint) DeeType_invoke_seq_tp_enumerate_index_NODEFAULT(tp_self, (tp_self)->tp_seq->tp_enumerate_index, self, proc, arg, starthint, endhint) #define DeeType_InvokeSeqBoundItem(tp_self, self, index) DeeType_invoke_seq_tp_bounditem(tp_self, (tp_self)->tp_seq->tp_bounditem, self, index) #define DeeType_InvokeSeqBoundItem_NODEFAULT(tp_self, self, index) DeeType_invoke_seq_tp_bounditem_NODEFAULT(tp_self, (tp_self)->tp_seq->tp_bounditem, self, index) #define DeeType_InvokeSeqHasItem(tp_self, self, index) DeeType_invoke_seq_tp_hasitem(tp_self, (tp_self)->tp_seq->tp_hasitem, self, index) diff --git a/include/deemon/object.h b/include/deemon/object.h index 51d9ec33d..5d7e5bda8 100644 --- a/include/deemon/object.h +++ b/include/deemon/object.h @@ -1998,7 +1998,7 @@ struct Dee_type_cmp { typedef WUNUSED_T NONNULL_T((2)) Dee_ssize_t (DCALL *Dee_foreach_t)(void *arg, DeeObject *elem); typedef WUNUSED_T NONNULL_T((2, 3)) Dee_ssize_t (DCALL *Dee_foreach_pair_t)(void *arg, DeeObject *key, DeeObject *value); typedef WUNUSED_T NONNULL_T((2)) Dee_ssize_t (DCALL *Dee_enumerate_t)(void *arg, DeeObject *index, /*nullable*/ DeeObject *value); -typedef WUNUSED_T NONNULL_T((2)) Dee_ssize_t (DCALL *Dee_enumerate_index_t)(void *arg, size_t index, /*nullable*/ DeeObject *value); +typedef WUNUSED_T Dee_ssize_t (DCALL *Dee_enumerate_index_t)(void *arg, size_t index, /*nullable*/ DeeObject *value); struct Dee_type_nsi; struct Dee_type_seq_cache; @@ -2030,9 +2030,10 @@ struct Dee_type_seq { WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_foreach)(DeeObject *__restrict self, Dee_foreach_t proc, void *arg); WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_foreach_pair)(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); - /* TODO: For enumerating available indices/keys, and their current values (which may be NULL if `this[index] !is bound') */ - //TODO: WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_enumerate)(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); - //TODO: WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_enumerate_index)(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); + /* Alternate forms for `tp_foreach' (these are inherited by `DeeType_InheritIter()'). + * For enumerating available indices/keys, and their current values (which may be NULL if `this[index] !is bound') */ + WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_enumerate)(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); + WUNUSED_T NONNULL_T((1, 2)) Dee_ssize_t (DCALL *tp_enumerate_index)(DeeObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); /* Optional function to check if a specific item index/key is bound. (inherited alongside `tp_getitem') * Check if a given item is bound (`self[index] is bound' / `deemon.bounditem(self, index)') @@ -2195,6 +2196,22 @@ myob_foreach_pair(MyObject *__restrict self, Dee_foreach_pair_t proc, void *arg) return DeeError_NOTIMPLEMENTED(); } +PRIVATE WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +myob_enumerate(MyObject *__restrict self, Dee_enumerate_t proc, void *arg) { + (void)self; + (void)proc; + (void)arg; + return DeeError_NOTIMPLEMENTED(); +} + +PRIVATE WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +myob_enumerate_index(MyObject *__restrict self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint) { + (void)self; + (void)proc; + (void)arg; + return DeeError_NOTIMPLEMENTED(); +} + PRIVATE WUNUSED NONNULL((1, 2)) int DCALL myob_bounditem(MyObject *self, DeeObject *index) { (void)self; @@ -2448,6 +2465,8 @@ PRIVATE struct type_seq myob_seq = { /* .tp_nsi = */ &myob_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&myob_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&myob_foreach_pair, + /* .tp_enumerate = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_enumerate_t, void *))&myob_enumerate, + /* .tp_enumerate_index = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_enumerate_index_t, void *, size_t, size_t))&myob_enumerate_index, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&myob_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&myob_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&myob_size, @@ -4517,7 +4536,9 @@ DFUNDEF WUNUSED NONNULL((1, 2)) int (DCALL DeeObject_InplacePow)(DREF DeeObject DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_AddInt8)(DeeObject *__restrict self, int8_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_SubInt8)(DeeObject *__restrict self, int8_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_AddUInt32)(DeeObject *__restrict self, uint32_t val); +DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_AddUInt64)(DeeObject *__restrict self, uint64_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_SubUInt32)(DeeObject *__restrict self, uint32_t val); +DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_SubUInt64)(DeeObject *__restrict self, uint64_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_MulInt8)(DeeObject *__restrict self, int8_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_DivInt8)(DeeObject *__restrict self, int8_t val); DFUNDEF WUNUSED NONNULL((1)) DREF DeeObject *(DCALL DeeObject_ModInt8)(DeeObject *__restrict self, int8_t val); @@ -4538,6 +4559,13 @@ DFUNDEF WUNUSED NONNULL((1)) int (DCALL DeeObject_InplaceShrUInt8)(DREF DeeObjec DFUNDEF WUNUSED NONNULL((1)) int (DCALL DeeObject_InplaceAndUInt32)(DREF DeeObject **__restrict p_self, uint32_t val); DFUNDEF WUNUSED NONNULL((1)) int (DCALL DeeObject_InplaceOrUInt32)(DREF DeeObject **__restrict p_self, uint32_t val); DFUNDEF WUNUSED NONNULL((1)) int (DCALL DeeObject_InplaceXorUInt32)(DREF DeeObject **__restrict p_self, uint32_t val); +#if __SIZEOF_SIZE_T__ > 4 +#define DeeObject_AddSize(self, val) DeeObject_AddUInt64(self, (uint64_t)(val)) +#define DeeObject_SubSize(self, val) DeeObject_SubUInt64(self, (uint64_t)(val)) +#else /* __SIZEOF_SIZE_T__ > 4 */ +#define DeeObject_AddSize(self, val) DeeObject_AddUInt32(self, (uint32_t)(val)) +#define DeeObject_SubSize(self, val) DeeObject_SubUInt32(self, (uint32_t)(val)) +#endif /* __SIZEOF_SIZE_T__ <= 4 */ /* Comparison operator invocation. */ @@ -4769,6 +4797,26 @@ DFUNDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t /* TODO: Refactor more code to use t DFUNDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t /* TODO: Refactor more code to use this instead of `DeeObject_Unpack()' */ (DCALL DeeObject_ForeachPair)(DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg); + +/* Enumerate valid keys/indices of "self", as well as their current value. + * @return: * : Sum of return values of `*proc' + * @return: -1: An error occurred during iteration (or potentially inside of `*proc') */ +DFUNDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t +(DCALL DeeObject_Enumerate)(DeeObject *__restrict self, Dee_enumerate_t proc, void *arg); + +/* Same as `DeeObject_Enumerate()', but only valid when "self" uses integers for indices + * or is a mapping where all keys are integers. In the former case, [starthint,endhint) + * can be given in order to allow the implementation to only enumerate indices that fall + * within that range (though an implementation is allowed to simply ignore these arguments) + * If you want to always enumerate all indices (like is also done by `DeeObject_Enumerate', + * then simply pass `starthint = 0, endhint = (size_t)-1') + * @return: * : Sum of return values of `*proc' + * @return: -1: An error occurred during iteration (or potentially inside of `*proc') */ +DFUNDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t +(DCALL DeeObject_EnumerateIndex)(DeeObject *__restrict self, Dee_enumerate_index_t proc, + void *arg, size_t starthint, size_t endhint); + + /* Unpack the given sequence `self' into `objc' items then stored within the `objv' vector. */ DFUNDEF WUNUSED ATTR_OUTS(3, 2) NONNULL((1)) int (DCALL DeeObject_Unpack)(DeeObject *__restrict self, size_t objc, diff --git a/include/deemon/super.h b/include/deemon/super.h index af628f60b..aeeb3da86 100644 --- a/include/deemon/super.h +++ b/include/deemon/super.h @@ -150,6 +150,8 @@ DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_TTryCompareEq)(DeeTypeOb /* Sequence operators */ DFUNDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t (DCALL DeeObject_TForeach)(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_t proc, void *arg); DFUNDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t (DCALL DeeObject_TForeachPair)(DeeTypeObject *tp_self, DeeObject *self, Dee_foreach_pair_t proc, void *arg); +DFUNDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t (DCALL DeeObject_TEnumerate)(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_t proc, void *arg); +DFUNDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t (DCALL DeeObject_TEnumerateIndex)(DeeTypeObject *tp_self, DeeObject *self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint); DFUNDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *(DCALL DeeObject_TIter)(DeeTypeObject *tp_self, DeeObject *self); DFUNDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *(DCALL DeeObject_TIterNext)(DeeTypeObject *tp_self, DeeObject *self); DFUNDEF WUNUSED NONNULL((1, 2)) DREF DeeObject *(DCALL DeeObject_TSizeOb)(DeeTypeObject *tp_self, DeeObject *self); diff --git a/src/deemon/execute/function-wrappers.c b/src/deemon/execute/function-wrappers.c index 9833757ab..f511927ee 100644 --- a/src/deemon/execute/function-wrappers.c +++ b/src/deemon/execute/function-wrappers.c @@ -541,7 +541,9 @@ PRIVATE struct type_seq funcstatics_seq = { /* .tp_setrange = */ NULL, /* .tp_nsi = */ &funcstatics_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&funcstatics_foreach, - /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))NULL, + /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&funcstatics_nsi_getsize, @@ -1415,6 +1417,8 @@ PRIVATE struct type_seq funcsymbolsbyname_seq = { /* .tp_nsi = */ &funcsymbolsbyname_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&funcsymbolsbyname_nsi_getsize, @@ -2399,6 +2403,8 @@ PRIVATE struct type_seq yfuncsymbolsbyname_seq = { /* .tp_nsi = */ &yfuncsymbolsbyname_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&yfuncsymbolsbyname_nsi_getsize, @@ -2680,6 +2686,8 @@ PRIVATE struct type_seq frameargs_seq = { /* .tp_nsi = */ &frameargs_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&frameargs_nsi_getsize, @@ -2987,6 +2995,8 @@ PRIVATE struct type_seq framelocals_seq = { /* .tp_nsi = */ &framelocals_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&framelocals_nsi_getsize, @@ -3369,6 +3379,8 @@ PRIVATE struct type_seq framestack_seq = { /* .tp_nsi = */ &framestack_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&framestack_nsi_getsize, @@ -4711,6 +4723,8 @@ PRIVATE struct type_seq framesymbolsbyname_seq = { /* .tp_nsi = */ &framesymbolsbyname_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&framesymbolsbyname_nsi_getsize, diff --git a/src/deemon/execute/module_globals.c b/src/deemon/execute/module_globals.c index 4758e4085..55a725987 100644 --- a/src/deemon/execute/module_globals.c +++ b/src/deemon/execute/module_globals.c @@ -776,6 +776,8 @@ PRIVATE struct type_seq modglobals_seq = { /* .tp_nsi = */ &modglobals_nsi, /* .tp_foreach = */ NULL, /* TODO */ /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&modglobals_nsi_getsize, diff --git a/src/deemon/objects/bytes.c b/src/deemon/objects/bytes.c index d47504da2..a8dd2eeac 100644 --- a/src/deemon/objects/bytes.c +++ b/src/deemon/objects/bytes.c @@ -1475,6 +1475,8 @@ PRIVATE struct type_seq bytes_seq = { /* .tp_nsi = */ &bytes_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&bytes_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&bytes_size, diff --git a/src/deemon/objects/cached-dict.c b/src/deemon/objects/cached-dict.c index a1cfe3a64..3cedaf26b 100644 --- a/src/deemon/objects/cached-dict.c +++ b/src/deemon/objects/cached-dict.c @@ -1268,6 +1268,8 @@ PRIVATE struct type_seq cdict_seq = { /* .tp_nsi = */ &cdict_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&cdict_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&cdict_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&cdict_bounditem, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&cdict_size, diff --git a/src/deemon/objects/class_desc.c b/src/deemon/objects/class_desc.c index cc59ee4ee..e54be43f4 100644 --- a/src/deemon/objects/class_desc.c +++ b/src/deemon/objects/class_desc.c @@ -457,6 +457,8 @@ PRIVATE struct type_seq cot_seq = { /* .tp_nsi = */ &cot_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&cot_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&cot_size, @@ -1078,6 +1080,8 @@ PRIVATE struct type_seq cat_seq = { /* .tp_nsi = */ &cat_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&cat_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&cat_size, @@ -2616,6 +2620,8 @@ PRIVATE struct type_seq ot_seq = { /* .tp_nsi = */ &ot_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ot_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ot_size, diff --git a/src/deemon/objects/dict.c b/src/deemon/objects/dict.c index 15eba4550..854d787dd 100644 --- a/src/deemon/objects/dict.c +++ b/src/deemon/objects/dict.c @@ -2522,6 +2522,8 @@ PRIVATE struct type_seq dict_seq = { /* .tp_nsi = */ &dict_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&dict_foreach, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&dict_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&dict_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&dict_size, diff --git a/src/deemon/objects/dictproxy.c b/src/deemon/objects/dictproxy.c index 9aff5c7f6..511b00397 100644 --- a/src/deemon/objects/dictproxy.c +++ b/src/deemon/objects/dictproxy.c @@ -658,6 +658,8 @@ PRIVATE struct type_seq proxy_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -805,6 +807,8 @@ PRIVATE struct type_seq dict_keys_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&dict_keys_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -850,6 +854,8 @@ PRIVATE struct type_seq dict_items_seq = { /* .tp_foreach = */ NULL, /* .tp_nsi = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&dict_items_foreach, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -895,6 +901,8 @@ PRIVATE struct type_seq dict_values_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&dict_values_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, diff --git a/src/deemon/objects/gc_inspect.c b/src/deemon/objects/gc_inspect.c index 9c8aa9920..52f5266a4 100644 --- a/src/deemon/objects/gc_inspect.c +++ b/src/deemon/objects/gc_inspect.c @@ -298,6 +298,8 @@ PRIVATE struct type_seq gcset_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&gcset_size, diff --git a/src/deemon/objects/hashset.c b/src/deemon/objects/hashset.c index 82eb9e3ab..ea3b81f09 100644 --- a/src/deemon/objects/hashset.c +++ b/src/deemon/objects/hashset.c @@ -1872,6 +1872,8 @@ PRIVATE struct type_seq hashset_seq = { /* .tp_nsi = */ &hashset_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&hashset_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&hashset_size, diff --git a/src/deemon/objects/list.c b/src/deemon/objects/list.c index fd8aa19c8..e8108e185 100644 --- a/src/deemon/objects/list.c +++ b/src/deemon/objects/list.c @@ -2385,6 +2385,8 @@ PRIVATE struct type_seq list_seq = { /* .tp_nsi = */ &list_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&list_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* default */ /* .tp_hasitem = */ NULL, /* default */ /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&list_size, diff --git a/src/deemon/objects/map.c b/src/deemon/objects/map.c index c9163855b..f56b1dec1 100644 --- a/src/deemon/objects/map.c +++ b/src/deemon/objects/map.c @@ -893,6 +893,8 @@ PRIVATE struct type_seq proxykeys_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -938,6 +940,8 @@ PRIVATE struct type_seq proxyvalues_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -983,6 +987,8 @@ PRIVATE struct type_seq proxyitems_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -1859,6 +1865,8 @@ PRIVATE struct type_seq map_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&generic_map_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&generic_map_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&generic_map_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&generic_map_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&generic_map_size, diff --git a/src/deemon/objects/none.c b/src/deemon/objects/none.c index f1a9fb7f0..10e21c51b 100644 --- a/src/deemon/objects/none.c +++ b/src/deemon/objects/none.c @@ -290,6 +290,8 @@ PRIVATE struct type_seq none_seq = { /* .tp_nsi = */ &none_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&none_s3, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&none_s3, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&none_i2_1, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&none_i2_1, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&none_s1, diff --git a/src/deemon/objects/rodict.c b/src/deemon/objects/rodict.c index fb7d7f0b7..238980ccf 100644 --- a/src/deemon/objects/rodict.c +++ b/src/deemon/objects/rodict.c @@ -1007,6 +1007,8 @@ PRIVATE struct type_seq rodict_seq = { /* .tp_nsi = */ &rodict_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&rodict_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&rodict_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rodict_size, diff --git a/src/deemon/objects/roset.c b/src/deemon/objects/roset.c index 54a17ed00..b4f909681 100644 --- a/src/deemon/objects/roset.c +++ b/src/deemon/objects/roset.c @@ -514,6 +514,8 @@ PRIVATE struct type_seq roset_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&roset_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&roset_size, diff --git a/src/deemon/objects/seq.c b/src/deemon/objects/seq.c index a6b4bb059..4f8b76710 100644 --- a/src/deemon/objects/seq.c +++ b/src/deemon/objects/seq.c @@ -2930,6 +2930,8 @@ PRIVATE struct type_seq generic_seq_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ &generic_seq_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ &generic_seq_bounditem, /* .tp_hasitem = */ &generic_seq_hasitem, /* .tp_size = */ &generic_seq_size, diff --git a/src/deemon/objects/seq/concat.c b/src/deemon/objects/seq/concat.c index b7154bfb4..cb3b409a5 100644 --- a/src/deemon/objects/seq/concat.c +++ b/src/deemon/objects/seq/concat.c @@ -633,6 +633,8 @@ PRIVATE struct type_seq cat_seq = { /* .tp_nsi = */ &cat_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&cat_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&cat_size, diff --git a/src/deemon/objects/seq/default-sequences.c b/src/deemon/objects/seq/default-sequences.c index 8bcf4c996..eb5d54ac0 100644 --- a/src/deemon/objects/seq/default-sequences.c +++ b/src/deemon/objects/seq/default-sequences.c @@ -703,6 +703,8 @@ PRIVATE struct type_seq ds_sgi_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ds_sgi_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ds_sgi_size, @@ -748,6 +750,8 @@ PRIVATE struct type_seq ds_sgif_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ds_sgif_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ds_sgif_size, @@ -793,6 +797,8 @@ PRIVATE struct type_seq ds_stgi_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ds_stgi_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ds_stgi_size, @@ -1449,6 +1455,8 @@ PRIVATE struct type_seq ds_sg_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ds_sg_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&ds_sg_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&ds_sg_hasitem, /* .tp_size = */ NULL, @@ -1480,6 +1488,8 @@ PRIVATE struct type_seq ds_tsg_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ds_tsg_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&ds_tsg_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&ds_tsg_hasitem, /* .tp_size = */ NULL, @@ -1987,6 +1997,8 @@ PRIVATE struct type_seq ds_i_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ds_i_size, @@ -2018,6 +2030,8 @@ PRIVATE struct type_seq ds_ti_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&ds_ti_size, diff --git a/src/deemon/objects/seq/each-fastpass.c.inl b/src/deemon/objects/seq/each-fastpass.c.inl index 504830dc2..36a2f643c 100644 --- a/src/deemon/objects/seq/each-fastpass.c.inl +++ b/src/deemon/objects/seq/each-fastpass.c.inl @@ -711,6 +711,8 @@ PRIVATE struct type_seq F(seq) = { /* .tp_nsi = */ &F(nsi), /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&F(foreach), /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&sew_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&sew_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&sew_size, diff --git a/src/deemon/objects/seq/each.c b/src/deemon/objects/seq/each.c index d7b9ce211..c050dc8f3 100644 --- a/src/deemon/objects/seq/each.c +++ b/src/deemon/objects/seq/each.c @@ -976,6 +976,8 @@ PRIVATE struct type_seq se_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ NULL, @@ -2312,6 +2314,8 @@ PRIVATE struct type_seq seo_seq = { /* .tp_nsi = */ &seo_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&seo_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&sew_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&sew_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&sew_size, diff --git a/src/deemon/objects/seq/range.c b/src/deemon/objects/seq/range.c index 63ea5f58a..23ef6dc93 100644 --- a/src/deemon/objects/seq/range.c +++ b/src/deemon/objects/seq/range.c @@ -1476,6 +1476,8 @@ PRIVATE struct type_seq intrange_seq = { /* .tp_nsi = */ &intrange_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&intrange_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&intrange_size, diff --git a/src/deemon/objects/seq/repeat.c b/src/deemon/objects/seq/repeat.c index 6204d6ae6..45b7973f7 100644 --- a/src/deemon/objects/seq/repeat.c +++ b/src/deemon/objects/seq/repeat.c @@ -631,6 +631,8 @@ PRIVATE struct type_seq repeat_seq = { /* .tp_nsi = */ &repeat_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&repeat_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&repeat_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&repeat_size, @@ -1138,6 +1140,8 @@ PRIVATE struct type_seq repeatitem_seq = { /* .tp_nsi = */ &repeatitem_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&repeatitem_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&repeatitem_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&repeatitem_size, diff --git a/src/deemon/objects/seq/segments.c b/src/deemon/objects/seq/segments.c index 03f646c6f..628800416 100644 --- a/src/deemon/objects/seq/segments.c +++ b/src/deemon/objects/seq/segments.c @@ -400,6 +400,8 @@ PRIVATE struct type_seq seg_seq = { /* .tp_nsi = */ &seg_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&seg_size, diff --git a/src/deemon/objects/seq/simpleproxy.c b/src/deemon/objects/seq/simpleproxy.c index 651f59b57..bdfcdc1be 100644 --- a/src/deemon/objects/seq/simpleproxy.c +++ b/src/deemon/objects/seq/simpleproxy.c @@ -452,6 +452,8 @@ PRIVATE struct type_seq ids_seq = { /* .tp_nsi = */ &ids_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&ids_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -497,6 +499,8 @@ PRIVATE struct type_seq types_seq = { /* .tp_nsi = */ &types_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&types_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, @@ -542,6 +546,8 @@ PRIVATE struct type_seq classes_seq = { /* .tp_nsi = */ &classes_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&classes_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&proxy_size, diff --git a/src/deemon/objects/seq/smap.c b/src/deemon/objects/seq/smap.c index fc8863f1f..891d01526 100644 --- a/src/deemon/objects/seq/smap.c +++ b/src/deemon/objects/seq/smap.c @@ -743,6 +743,8 @@ PRIVATE struct type_seq smap_seq = { /* .tp_nsi = */ &smap_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&smap_foreach, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* default */ /* .tp_hasitem = */ NULL, /* default */ /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&smap_size, diff --git a/src/deemon/objects/seq/svec.c b/src/deemon/objects/seq/svec.c index e0fcb3201..dbbf9eb87 100644 --- a/src/deemon/objects/seq/svec.c +++ b/src/deemon/objects/seq/svec.c @@ -797,6 +797,8 @@ PRIVATE struct type_seq rvec_seq = { /* .tp_nsi = */ &rvec_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&rvec_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rvec_size, @@ -1350,6 +1352,8 @@ PRIVATE struct type_seq svec_seq = { /* .tp_nsi = */ &svec_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&svec_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&svec_size, diff --git a/src/deemon/objects/seq/transform.c b/src/deemon/objects/seq/transform.c index 1d8d6f9ae..75e0b582f 100644 --- a/src/deemon/objects/seq/transform.c +++ b/src/deemon/objects/seq/transform.c @@ -556,6 +556,8 @@ PRIVATE struct type_seq trans_seq = { /* .tp_nsi = */ &trans_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&trans_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&trans_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&trans_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&trans_size, diff --git a/src/deemon/objects/seq/typemro.c b/src/deemon/objects/seq/typemro.c index e614d5751..91ea69ada 100644 --- a/src/deemon/objects/seq/typemro.c +++ b/src/deemon/objects/seq/typemro.c @@ -880,6 +880,8 @@ PRIVATE struct type_seq typemro_seq = { /* .tp_nsi = */ &typemro_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&typemro_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&typemro_size, @@ -925,6 +927,8 @@ PRIVATE struct type_seq typebases_seq = { /* .tp_nsi = */ &typebases_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&typebases_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&typebases_size, diff --git a/src/deemon/objects/set.c b/src/deemon/objects/set.c index 3147b51b1..87a493c54 100644 --- a/src/deemon/objects/set.c +++ b/src/deemon/objects/set.c @@ -1029,6 +1029,8 @@ PRIVATE struct type_seq set_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&generic_set_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&generic_set_size, diff --git a/src/deemon/objects/string.c b/src/deemon/objects/string.c index 5d16f835d..ed964c6dd 100644 --- a/src/deemon/objects/string.c +++ b/src/deemon/objects/string.c @@ -1656,6 +1656,8 @@ PRIVATE struct type_seq string_seq = { /* .tp_nsi = */ &string_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&string_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&string_size, diff --git a/src/deemon/objects/super.c b/src/deemon/objects/super.c index 6e61d906e..b11a28201 100644 --- a/src/deemon/objects/super.c +++ b/src/deemon/objects/super.c @@ -615,6 +615,16 @@ super_foreach_pair(Super *me, Dee_foreach_pair_t proc, void *arg) { return DeeObject_TForeachPair(me->s_type, me->s_self, proc, arg); } +PRIVATE WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +super_enumerate(Super *__restrict me, Dee_enumerate_t proc, void *arg) { + return DeeObject_TEnumerate(me->s_type, me->s_self, proc, arg); +} + +PRIVATE WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +super_enumerate_index(Super *__restrict me, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint) { + return DeeObject_TEnumerateIndex(me->s_type, me->s_self, proc, arg, starthint, endhint); +} + PRIVATE WUNUSED NONNULL((1, 2)) int DCALL super_bounditem(Super *self, DeeObject *index) { return DeeObject_TBoundItem(self->s_type, self->s_self, index); @@ -774,6 +784,8 @@ PRIVATE struct type_seq super_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&super_foreach, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&super_foreach_pair, + /* .tp_enumerate = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_enumerate_t, void *))&super_enumerate, + /* .tp_enumerate_index = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_enumerate_index_t, void *, size_t, size_t))&super_enumerate_index, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&super_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&super_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&super_size, diff --git a/src/deemon/objects/tuple.c b/src/deemon/objects/tuple.c index b33d87ab9..658bc10c5 100644 --- a/src/deemon/objects/tuple.c +++ b/src/deemon/objects/tuple.c @@ -1641,6 +1641,8 @@ PRIVATE struct type_seq tuple_seq = { /* .tp_nsi = */ &tuple_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&tuple_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&tuple_size, diff --git a/src/deemon/objects/unicode/bytes_segments.c.inl b/src/deemon/objects/unicode/bytes_segments.c.inl index 61217366e..00598375e 100644 --- a/src/deemon/objects/unicode/bytes_segments.c.inl +++ b/src/deemon/objects/unicode/bytes_segments.c.inl @@ -357,6 +357,8 @@ PRIVATE struct type_seq bseg_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&bseg_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&bseg_size, diff --git a/src/deemon/objects/unicode/ordinals.c.inl b/src/deemon/objects/unicode/ordinals.c.inl index 2e6370b37..2cf8be9f6 100644 --- a/src/deemon/objects/unicode/ordinals.c.inl +++ b/src/deemon/objects/unicode/ordinals.c.inl @@ -157,6 +157,8 @@ PRIVATE struct type_seq stringordinals_seq = { /* .tp_nsi = */ &stringordinals_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&stringordinals_size, diff --git a/src/deemon/objects/unicode/regroups.c b/src/deemon/objects/unicode/regroups.c index 8fff10c7c..701d04c13 100644 --- a/src/deemon/objects/unicode/regroups.c +++ b/src/deemon/objects/unicode/regroups.c @@ -117,6 +117,8 @@ PRIVATE struct type_seq rg_seq = { /* .tp_nsi = */ &rg_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rg_size, @@ -249,6 +251,8 @@ PRIVATE struct type_seq rss_seq = { /* .tp_nsi = */ &rss_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rss_size, @@ -326,6 +330,8 @@ PRIVATE struct type_seq rsb_seq = { /* .tp_nsi = */ &rsb_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rsb_size, diff --git a/src/deemon/objects/unicode/reproxy.c.inl b/src/deemon/objects/unicode/reproxy.c.inl index 1d0b025d5..6e41f79d6 100644 --- a/src/deemon/objects/unicode/reproxy.c.inl +++ b/src/deemon/objects/unicode/reproxy.c.inl @@ -1295,6 +1295,8 @@ PRIVATE struct type_seq refa_seq = { /* .tp_nsi = */ &refa_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&refa_size, @@ -1340,6 +1342,8 @@ PRIVATE struct type_seq rebfa_seq = { /* .tp_nsi = */ &rebfa_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rebfa_size, @@ -1545,6 +1549,8 @@ PRIVATE struct type_seq regfa_seq = { /* .tp_nsi = */ ®fa_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))®fa_size, @@ -1590,6 +1596,8 @@ PRIVATE struct type_seq regbfa_seq = { /* .tp_nsi = */ ®bfa_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))®bfa_size, @@ -1784,6 +1792,8 @@ PRIVATE struct type_seq rela_seq = { /* .tp_nsi = */ &rela_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rela_size, @@ -1829,6 +1839,8 @@ PRIVATE struct type_seq rebla_seq = { /* .tp_nsi = */ &rebla_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rebla_size, @@ -2088,6 +2100,8 @@ PRIVATE struct type_seq resp_seq = { /* .tp_nsi = */ &resp_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&resp_size, @@ -2133,6 +2147,8 @@ PRIVATE struct type_seq rebsp_seq = { /* .tp_nsi = */ &rebsp_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&rebsp_size, diff --git a/src/deemon/objects/unicode/segments.c.inl b/src/deemon/objects/unicode/segments.c.inl index 706e37a2d..e45c1b8ba 100644 --- a/src/deemon/objects/unicode/segments.c.inl +++ b/src/deemon/objects/unicode/segments.c.inl @@ -407,6 +407,8 @@ PRIVATE struct type_seq sseg_seq = { /* .tp_nsi = */ NULL, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&sseg_size, diff --git a/src/deemon/runtime/kwds-wrappers.c b/src/deemon/runtime/kwds-wrappers.c index f59d6cd05..85b5baa26 100644 --- a/src/deemon/runtime/kwds-wrappers.c +++ b/src/deemon/runtime/kwds-wrappers.c @@ -810,6 +810,8 @@ PRIVATE struct type_seq blv_seq = { /* .tp_nsi = */ &blv_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&blv_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&blv_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&blv_size, @@ -1801,6 +1803,8 @@ PRIVATE struct type_seq blkw_seq = { /* .tp_nsi = */ &blkw_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&blkw_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&blkw_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&blkw_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&blkw_size, diff --git a/src/deemon/runtime/kwds.c b/src/deemon/runtime/kwds.c index 2f53820ec..d38197cf6 100644 --- a/src/deemon/runtime/kwds.c +++ b/src/deemon/runtime/kwds.c @@ -697,6 +697,8 @@ PRIVATE struct type_seq kwds_seq = { /* .tp_nsi = */ &kwds_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&kwds_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&kwds_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&kwds_size, @@ -1393,6 +1395,8 @@ PRIVATE struct type_seq kmap_seq = { /* .tp_nsi = */ &kmap_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&kmap_foreach_pair, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&kmap_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&kmap_size, diff --git a/src/deemon/runtime/operator.c b/src/deemon/runtime/operator.c index 44fd0bf82..2d987034b 100644 --- a/src/deemon/runtime/operator.c +++ b/src/deemon/runtime/operator.c @@ -341,6 +341,10 @@ DeeSystem_DEFINE_memsetp(dee_memsetp) #define DeeType_INVOKE_FOREACH_NODEFAULT DeeType_InvokeSeqForeach_NODEFAULT #define DeeType_INVOKE_FOREACH_PAIR DeeType_InvokeSeqForeachPair #define DeeType_INVOKE_FOREACH_PAIR_NODEFAULT DeeType_InvokeSeqForeachPair_NODEFAULT +#define DeeType_INVOKE_ENUMERATE DeeType_InvokeSeqEnumerate +#define DeeType_INVOKE_ENUMERATE_NODEFAULT DeeType_InvokeSeqEnumerate_NODEFAULT +#define DeeType_INVOKE_ENUMERATE_INDEX DeeType_InvokeSeqEnumerateIndex +#define DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT DeeType_InvokeSeqEnumerateIndex_NODEFAULT #define DeeType_INVOKE_BOUNDITEM DeeType_InvokeSeqBoundItem #define DeeType_INVOKE_BOUNDITEM_NODEFAULT DeeType_InvokeSeqBoundItem_NODEFAULT #define DeeType_INVOKE_HASITEM DeeType_InvokeSeqHasItem @@ -472,6 +476,8 @@ DeeSystem_DEFINE_memsetp(dee_memsetp) #define DeeType_INVOKE_SETRANGE(tp_self, self, start, end, values) (*(tp_self)->tp_seq->tp_setrange)(self, start, end, values) #define DeeType_INVOKE_FOREACH(tp_self, self, proc, arg) (*(tp_self)->tp_seq->tp_foreach)(self, proc, arg) #define DeeType_INVOKE_FOREACH_PAIR(tp_self, self, proc, arg) (*(tp_self)->tp_seq->tp_foreach_pair)(self, proc, arg) +#define DeeType_INVOKE_ENUMERATE(tp_self, self, proc, arg) (*(tp_self)->tp_seq->tp_enumerate)(self, proc, arg) +#define DeeType_INVOKE_ENUMERATE_INDEX(tp_self, self, proc, arg, starthint, endhint) (*(tp_self)->tp_seq->tp_enumerate_index)(self, proc, arg, starthint, endhint) #define DeeType_INVOKE_BOUNDITEM(tp_self, self, index) (*(tp_self)->tp_seq->tp_bounditem)(self, index) #define DeeType_INVOKE_HASITEM(tp_self, self, index) (*(tp_self)->tp_seq->tp_hasitem)(self, index) #define DeeType_INVOKE_SIZE(tp_self, self) (*(tp_self)->tp_seq->tp_size)(self) @@ -569,6 +575,8 @@ DeeSystem_DEFINE_memsetp(dee_memsetp) #define DeeType_INVOKE_SETRANGE_NODEFAULT DeeType_INVOKE_SETRANGE #define DeeType_INVOKE_FOREACH_NODEFAULT DeeType_INVOKE_FOREACH #define DeeType_INVOKE_FOREACH_PAIR_NODEFAULT DeeType_INVOKE_FOREACH_PAIR +#define DeeType_INVOKE_ENUMERATE_NODEFAULT DeeType_INVOKE_ENUMERATE +#define DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT DeeType_INVOKE_ENUMERATE_INDEX #define DeeType_INVOKE_BOUNDITEM_NODEFAULT DeeType_INVOKE_BOUNDITEM #define DeeType_INVOKE_HASITEM_NODEFAULT DeeType_INVOKE_HASITEM #define DeeType_INVOKE_SIZE_NODEFAULT DeeType_INVOKE_SIZE @@ -3707,11 +3715,11 @@ DEFINE_INTERNAL_SET_OPERATOR(Dee_hash_t, DefaultHashWithForeachDefault, (DeeObje } INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL -default_map_hash_with_foreach_cb(void *arg, DeeObject *key, DeeObject *value); +default_map_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL -default_map_hash_with_foreach_cb(void *arg, DeeObject *key, DeeObject *value) { +default_map_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { /* Note that we still combine the hashes for the key and value, * thus not only mirroring the behavior of hash of the item (that * is the tuple `(key, value)', including the order between the @@ -3726,7 +3734,7 @@ default_map_hash_with_foreach_cb(void *arg, DeeObject *key, DeeObject *value) { DEFINE_INTERNAL_MAP_OPERATOR(Dee_hash_t, DefaultHashWithForeachPairDefault, (DeeObject *self)) { Dee_hash_t result = DEE_HASHOF_EMPTY_SEQUENCE; LOAD_TP_SELF; - if unlikely(DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_hash_with_foreach_cb, &result)) + if unlikely(DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_hash_with_foreach_pair_cb, &result)) goto err; return result; err: @@ -5647,6 +5655,28 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultIterWithForeachPair, return NULL; } +DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultIterWithEnumerate, + (DeeObject *__restrict self)) { + LOAD_TP_SELF; + /* TODO: Custom iterator type that uses "tp_enumerate" */ + (void)tp_self; + (void)self; + DeeError_NOTIMPLEMENTED(); + return NULL; +} + +DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultIterWithEnumerateIndex, + (DeeObject *__restrict self)) { + LOAD_TP_SELF; + /* TODO: Custom iterator type that uses "tp_enumerate_index" */ + (void)tp_self; + (void)self; + DeeError_NOTIMPLEMENTED(); + return NULL; +} + + +/* tp_foreach */ DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachWithIter, (DeeObject *__restrict self, Dee_foreach_t proc, void *arg)) { Dee_ssize_t temp, result; @@ -5679,6 +5709,45 @@ DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachWithIter, return -1; } +struct default_foreach_with_enumerate_data { + Dee_foreach_t dfwe_proc; /* [1..1] Underlying callback */ + void *dfwe_arg; /* [?..?] Cookie for `dfwe_proc' */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_foreach_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_foreach_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_foreach_with_enumerate_data *data; + data = (struct default_foreach_with_enumerate_data *)arg; + (void)key; + if likely(value) + return (*data->dfwe_proc)(data->dfwe_arg, value); + return 0; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachWithEnumerate, + (DeeObject *__restrict self, Dee_foreach_t proc, void *arg)) { + struct default_foreach_with_enumerate_data data; + LOAD_TP_SELF; + data.dfwe_proc = proc; + data.dfwe_arg = arg; + return DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_foreach_with_enumerate_cb, &data); +} + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachWithEnumerateIndex, + (DeeObject *__restrict self, Dee_foreach_t proc, void *arg)) { + struct default_foreach_with_enumerate_data data; + LOAD_TP_SELF; + data.dfwe_proc = proc; + data.dfwe_arg = arg; + return DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT(tp_self, self, (Dee_enumerate_index_t)&default_foreach_with_enumerate_cb, &data, 0, (size_t)-1); +} + + DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithIter, (DeeObject *__restrict self, Dee_foreach_pair_t proc, void *arg)) { Dee_ssize_t temp, result; @@ -5720,6 +5789,44 @@ DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithIter, return -1; } +struct default_map_foreach_pair_with_enumerate_data { + Dee_foreach_pair_t dmfpwe_proc; /* [1..1] Underlying callback */ + void *dmfpwe_arg; /* [?..?] Cookie for `dmfpwe_proc' */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_foreach_pair_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_foreach_pair_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_map_foreach_pair_with_enumerate_data *data; + data = (struct default_map_foreach_pair_with_enumerate_data *)arg; + if likely(value) + return (*data->dmfpwe_proc)(data->dmfpwe_arg, key, value); + return 0; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_MAP_OPERATOR(Dee_ssize_t, DefaultForeachPairWithEnumerate, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_pair_t proc, void *arg)) { + struct default_map_foreach_pair_with_enumerate_data data; + LOAD_TP_SELF; + data.dmfpwe_proc = proc; + data.dmfpwe_arg = arg; + return DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_foreach_pair_with_enumerate_cb, &data); +} + +DEFINE_INTERNAL_MAP_OPERATOR(Dee_ssize_t, DefaultForeachPairWithEnumerateIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_pair_t proc, void *arg)) { + struct default_map_foreach_pair_with_enumerate_data data; + LOAD_TP_SELF; + data.dmfpwe_proc = proc; + data.dmfpwe_arg = arg; + return DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT(tp_self, self, (Dee_enumerate_index_t)&default_map_foreach_pair_with_enumerate_cb, &data, 0, (size_t)-1); +} + + struct default_foreach_with_foreach_pair_data { Dee_foreach_t dfwfp_proc; /* [1..1] Underlying callback. */ void *dfwfp_arg; /* Cookie for `dfwfp_proc' */ @@ -5762,6 +5869,8 @@ struct default_foreach_pair_with_foreach_data { INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL default_foreach_pair_with_foreach_cb(void *arg, DeeObject *elem); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_foreach_pair_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL @@ -5785,6 +5894,14 @@ default_foreach_pair_with_foreach_cb(void *arg, DeeObject *elem) { err: return -1; } + +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_foreach_pair_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + (void)key; + if likely(value) + return default_foreach_pair_with_foreach_cb(arg, value); + return 0; +} #endif /* !DEFINE_TYPED_OPERATORS */ DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithForeach, @@ -5796,6 +5913,54 @@ DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithForeach, return DeeType_INVOKE_FOREACH_NODEFAULT(tp_self, self, &default_foreach_pair_with_foreach_cb, &data); } +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithEnumerate, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_pair_t proc, void *arg)) { + struct default_foreach_pair_with_foreach_data data; + LOAD_TP_SELF; + data.dfpwf_proc = proc; + data.dfpwf_arg = arg; + return DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_foreach_pair_with_enumerate_cb, &data); +} + + +/* tp_enumerate */ +struct default_foreach_pair_with_enumerate_index_data { + Dee_foreach_pair_t dfpwei_proc; /* [1..1] Wrapped callback. */ + void *dfpwei_arg; /* [?..?] Cookie for `dfpwei_proc' */ +}; + +INTDEF WUNUSED NONNULL((1)) Dee_ssize_t DCALL +default_foreach_pair_with_enumerate_index_cb(void *arg, size_t index, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1)) Dee_ssize_t DCALL +default_foreach_pair_with_enumerate_index_cb(void *arg, size_t index, DeeObject *value) { + Dee_ssize_t result; + DREF DeeObject *indexob; + struct default_foreach_pair_with_enumerate_index_data *data; + if unlikely(!value) + return 0; + data = (struct default_foreach_pair_with_enumerate_index_data *)arg; + indexob = DeeInt_NewSize(index); + if unlikely(!indexob) + goto err; + result = (*data->dfpwei_proc)(data->dfpwei_arg, indexob, value); + Dee_Decref(indexob); + return result; +err: + return -1; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithEnumerateIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_pair_t proc, void *arg)) { + struct default_foreach_pair_with_enumerate_index_data data; + LOAD_TP_SELF; + data.dfpwei_proc = proc; + data.dfpwei_arg = arg; + return DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT(tp_self, self, &default_foreach_pair_with_enumerate_index_cb, &data, 0, (size_t)-1); +} + DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultForeachPairWithForeachDefault, (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_pair_t proc, void *arg)) { struct default_foreach_pair_with_foreach_data data; @@ -6123,62 +6288,728 @@ DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultForeachWithSizeObAndGetItem, return -1; } -DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultForeachWithSizeDefaultAndGetItemIndexDefault, - (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_t proc, void *arg)) { +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultForeachWithSizeDefaultAndGetItemIndexDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + for (i = 0; i < size; ++i) { + DREF DeeObject *elem; + elem = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); + if unlikely(!elem) { + if (DeeError_Catch(&DeeError_UnboundItem)) + continue; + if (DeeError_Catch(&DeeError_IndexError)) + break; /* In case the sequence's length got truncated since we checked above. */ + goto err; + } + temp = (*proc)(arg, elem); + Dee_Decref(elem); + if unlikely(temp < 0) + return temp; + result += temp; + } + return result; +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultForeachWithGetItemIndexDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i; + LOAD_TP_SELF; + for (i = 0;; ++i) { + DREF DeeObject *elem; + elem = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); + if unlikely(!elem) { + if (DeeError_Catch(&DeeError_UnboundItem)) + continue; + if (DeeError_Catch(&DeeError_IndexError)) + break; + goto err; + } + temp = (*proc)(arg, elem); + Dee_Decref(elem); + if unlikely(temp < 0) + return temp; + result += temp; + } + return result; +err: + return -1; +} + + + + + + +/* tp_enumerate */ +struct default_enumerate_with_enumerate_index_data { + Dee_enumerate_t dewei_proc; /* [1..1] Wrapped callback. */ + void *dewei_arg; /* [?..?] Cookie for `dewei_proc' */ +}; + +INTDEF WUNUSED NONNULL((1)) Dee_ssize_t DCALL +default_enumerate_with_enumerate_index_cb(void *arg, size_t index, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1)) Dee_ssize_t DCALL +default_enumerate_with_enumerate_index_cb(void *arg, size_t index, DeeObject *value) { + Dee_ssize_t result; + DREF DeeObject *indexob; + struct default_enumerate_with_enumerate_index_data *data; + data = (struct default_enumerate_with_enumerate_index_data *)arg; + indexob = DeeInt_NewSize(index); + if unlikely(!indexob) + goto err; + result = (*data->dewei_proc)(data->dewei_arg, indexob, value); + Dee_Decref(indexob); + return result; +err: + return -1; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultEnumerateWithEnumerateIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + struct default_enumerate_with_enumerate_index_data data; + LOAD_TP_SELF; + data.dewei_proc = proc; + data.dewei_arg = arg; + return DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT(tp_self, self, &default_enumerate_with_enumerate_index_cb, &data, 0, (size_t)-1); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithSizeAndGetItemIndexFast, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + for (i = 0; i < size; ++i) { + DREF DeeObject *indexob, *index_value; + indexob = DeeInt_NewSize(i); + if unlikely(!indexob) + goto err; + index_value = (*tp_self->tp_seq->tp_getitem_index_fast)(self, i); + temp = (*proc)(arg, indexob, index_value); + Dee_XDecref(index_value); + Dee_Decref(indexob); + if unlikely(temp < 0) + goto err_temp; + result += temp; + } + return result; +err_temp: + return temp; +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithSizeAndTryGetItemIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + DREF DeeObject *indexob, *index_value; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + for (i = 0; i < size; ++i) { + indexob = DeeInt_NewSize(i); + if unlikely(!indexob) + goto err; + index_value = DeeType_INVOKE_TRYGETITEMINDEX_NODEFAULT(tp_self, self, i); + if unlikely(!index_value) + goto err_indexob; + if (index_value == ITER_DONE) { + temp = (*proc)(arg, indexob, NULL); + } else { + temp = (*proc)(arg, indexob, index_value); + Dee_Decref(index_value); + } + Dee_Decref(indexob); + if unlikely(temp < 0) + goto err_temp; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err; + } + return result; +err_temp: + return temp; +err_indexob: + Dee_Decref(indexob); +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithSizeAndGetItemIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + DREF DeeObject *indexob, *index_value; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + for (i = 0; i < size; ++i) { + indexob = DeeInt_NewSize(i); + if unlikely(!indexob) + goto err; + index_value = DeeType_INVOKE_GETITEMINDEX_NODEFAULT(tp_self, self, i); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err_indexob; + } + temp = (*proc)(arg, indexob, index_value); + Dee_XDecref(index_value); + Dee_Decref(indexob); + if unlikely(temp < 0) + goto err_temp; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err; + } + return result; +err_temp: + return temp; +err_indexob: + Dee_Decref(indexob); +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithSizeObAndGetItem, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + DREF DeeObject *indexob, *index_value, *sizeob; + LOAD_TP_SELF; + sizeob = DeeType_INVOKE_SIZEOB_NODEFAULT(tp_self, self); + if unlikely(!sizeob) + goto err; + indexob = DeeObject_NewDefault(Dee_TYPE(sizeob)); + if unlikely(!indexob) + goto err_sizeob; + for (;;) { + int index_is_less_than_size = DeeObject_CmpLoAsBool(indexob, sizeob); + if (index_is_less_than_size <= 0) { + if unlikely(index_is_less_than_size < 0) + goto err_sizeob_indexob; + break; + } + index_value = DeeType_INVOKE_GETITEM_NODEFAULT(tp_self, self, indexob); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err_sizeob_indexob; + } + temp = (*proc)(arg, indexob, index_value); + Dee_XDecref(index_value); + if unlikely(temp < 0) + goto err_temp_sizeob_indexob; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err_sizeob_indexob; + } + Dee_Decref(indexob); + Dee_Decref(sizeob); + return result; +err_temp_sizeob_indexob: + Dee_Decref(indexob); + Dee_Decref(sizeob); + return temp; +err_sizeob_indexob: + Dee_Decref(indexob); +err_sizeob: + Dee_Decref(sizeob); +err: + return -1; +} + +struct default_enumerate_with_counter_and_foreach_data { + Dee_enumerate_t dewcaf_proc; /* [1..1] Wrapped callback */ + void *dewcaf_arg; /* [?..?] Cookie for `dewcaf_proc' */ + size_t dewcaf_counter; /* Index of the next element that will be enumerated */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_enumerate_with_counter_and_foreach_cb(void *arg, DeeObject *elem); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_enumerate_with_counter_and_foreach_cb(void *arg, DeeObject *elem) { + Dee_ssize_t result; + DREF DeeObject *indexob; + struct default_enumerate_with_counter_and_foreach_data *data; + data = (struct default_enumerate_with_counter_and_foreach_data *)arg; + indexob = DeeInt_NewSize(data->dewcaf_counter); + if unlikely(!indexob) + goto err; + ++data->dewcaf_counter; + result = (*data->dewcaf_proc)(data->dewcaf_arg, indexob, elem); + Dee_Decref(indexob); + return result; +err: + return -1; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithCounterAndForeach, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + struct default_enumerate_with_counter_and_foreach_data data; + LOAD_TP_SELF; + data.dewcaf_proc = proc; + data.dewcaf_arg = arg; + data.dewcaf_counter = 0; + return DeeType_INVOKE_FOREACH_NODEFAULT(tp_self, self, &default_enumerate_with_counter_and_foreach_cb, &data); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithCounterAndIter, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + size_t counter = 0; + Dee_ssize_t temp, result = 0; + DREF DeeObject *iter, *elem; + LOAD_TP_SELF; + iter = DeeType_INVOKE_ITER_NODEFAULT(tp_self, self); + if unlikely(!iter) + goto err; + while (ITER_ISOK(elem = DeeObject_IterNext(iter))) { + DREF DeeObject *indexob; + indexob = DeeInt_NewSize(counter); + if unlikely(!indexob) + goto err_iter_elem; + temp = (*proc)(arg, indexob, elem); + Dee_Decref(elem); + Dee_Decref(indexob); + if unlikely(temp < 0) + goto err_temp_iter; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err_iter; + ++counter; + } + if unlikely(!elem) + goto err_iter; + Dee_Decref(iter); + return result; +err_temp_iter: + Dee_Decref(iter); +/*err_temp:*/ + return temp; +err_iter_elem: + Dee_Decref(elem); +err_iter: + Dee_Decref(iter); +err: + return -1; +} + +DEFINE_INTERNAL_MAP_OPERATOR(Dee_ssize_t, DefaultEnumerateWithForeachPairDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + LOAD_TP_SELF; + return DeeType_INVOKE_FOREACH_PAIR(tp_self, self, proc, arg); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + DREF DeeObject *indexob, *index_value; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + for (i = 0; i < size; ++i) { + indexob = DeeInt_NewSize(i); + if unlikely(!indexob) + goto err; + index_value = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err_indexob; + } + temp = (*proc)(arg, indexob, index_value); + Dee_XDecref(index_value); + Dee_Decref(indexob); + if unlikely(temp < 0) + goto err_temp; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err; + } + return result; +err_temp: + return temp; +err_indexob: + Dee_Decref(indexob); +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateWithCounterAndForeachDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + struct default_enumerate_with_counter_and_foreach_data data; + LOAD_TP_SELF; + data.dewcaf_proc = proc; + data.dewcaf_arg = arg; + data.dewcaf_counter = 0; + return DeeType_INVOKE_FOREACH(tp_self, self, &default_enumerate_with_counter_and_foreach_cb, &data); +} + + + + + + +/* tp_enumerate_index */ +struct default_enumerate_index_with_enumerate_data { + Dee_enumerate_index_t deiwe_proc; /* [1..1] Underlying callback. */ + void *deiwe_arg; /* [?..?] Cookie for `deiwe_proc' */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_enumerate_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1)) Dee_ssize_t DCALL +default_enumerate_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + size_t index; + struct default_enumerate_index_with_enumerate_data *data; + data = (struct default_enumerate_index_with_enumerate_data *)arg; + if (DeeObject_AsSize(key, &index)) + goto err; + return (*data->deiwe_proc)(data->deiwe_arg, index, value); +err: + return -1; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithEnumerate, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + struct default_enumerate_index_with_enumerate_data data; + LOAD_TP_SELF; + (void)starthint; + (void)endhint; + data.deiwe_proc = proc; + data.deiwe_arg = arg; + return DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_enumerate_index_with_enumerate_cb, &data); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithSizeAndGetItemIndexFast, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + if (endhint > size) + endhint = size; + if (starthint > endhint) + starthint = endhint; + for (i = starthint; i < endhint; ++i) { + DREF DeeObject *index_value; + index_value = (*tp_self->tp_seq->tp_getitem_index_fast)(self, i); + temp = (*proc)(arg, i, index_value); + Dee_XDecref(index_value); + if unlikely(temp < 0) + goto err_temp; + result += temp; + } + return result; +err_temp: + return temp; +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithSizeAndTryGetItemIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + if (endhint > size) + endhint = size; + if (starthint > endhint) + starthint = endhint; + for (i = starthint; i < endhint; ++i) { + DREF DeeObject *index_value; + index_value = DeeType_INVOKE_TRYGETITEMINDEX_NODEFAULT(tp_self, self, i); + if unlikely(!index_value) + goto err; + if (index_value == ITER_DONE) { + temp = (*proc)(arg, i, NULL); + } else { + temp = (*proc)(arg, i, index_value); + Dee_Decref(index_value); + } + if unlikely(temp < 0) + goto err_temp; + result += temp; + } + return result; +err_temp: + return temp; +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithSizeAndGetItemIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + Dee_ssize_t temp, result = 0; + size_t i, size; + LOAD_TP_SELF; + size = DeeType_INVOKE_SIZE_NODEFAULT(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + if (endhint > size) + endhint = size; + if (starthint > endhint) + starthint = endhint; + for (i = starthint; i < endhint; ++i) { + DREF DeeObject *index_value; + index_value = DeeType_INVOKE_GETITEMINDEX_NODEFAULT(tp_self, self, i); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err; + } + temp = (*proc)(arg, i, index_value); + Dee_XDecref(index_value); + if unlikely(temp < 0) + goto err_temp; + result += temp; + } + return result; +err_temp: + return temp; +err: + return -1; +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithSizeObAndGetItem, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + Dee_ssize_t temp, result = 0; + DREF DeeObject *indexob, *index_value, *sizeob; + LOAD_TP_SELF; + sizeob = DeeType_INVOKE_SIZEOB_NODEFAULT(tp_self, self); + if unlikely(!sizeob) + goto err; + indexob = DeeObject_NewDefault(Dee_TYPE(sizeob)); + if unlikely(!indexob) + goto err_sizeob; + if (starthint != 0) { + DREF DeeObject *new_indexob; + new_indexob = DeeObject_AddSize(indexob, starthint); + Dee_Decref(indexob); + if unlikely(!new_indexob) + goto err_sizeob; + indexob = new_indexob; + } + if (endhint != (size_t)-1) { + int size_is_greater_than_endhint; + DREF DeeObject *endhintob; + endhintob = DeeInt_NewSize(endhint); + if unlikely(!endhintob) + goto err_sizeob_indexob; + size_is_greater_than_endhint = DeeObject_CmpGrAsBool(sizeob, endhintob); + if (size_is_greater_than_endhint != 0) { + Dee_Decref(sizeob); + sizeob = endhintob; + if unlikely(size_is_greater_than_endhint < 0) + goto err_sizeob_indexob; + } + } + for (;;) { + size_t index; + int index_is_less_than_size = DeeObject_CmpLoAsBool(indexob, sizeob); + if (index_is_less_than_size <= 0) { + if unlikely(index_is_less_than_size < 0) + goto err_sizeob_indexob; + break; + } + index_value = DeeType_INVOKE_GETITEM_NODEFAULT(tp_self, self, indexob); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err_sizeob_indexob; + } + if unlikely(DeeObject_AsSize(indexob, &index)) + goto err_sizeob_indexob; + temp = (*proc)(arg, index, index_value); + Dee_XDecref(index_value); + if unlikely(temp < 0) + goto err_temp_sizeob_indexob; + result += temp; + if (DeeThread_CheckInterrupt()) + goto err_sizeob_indexob; + } + Dee_Decref(indexob); + Dee_Decref(sizeob); + return result; +err_temp_sizeob_indexob: + Dee_Decref(indexob); + Dee_Decref(sizeob); + return temp; +err_sizeob_indexob: + Dee_Decref(indexob); +err_sizeob: + Dee_Decref(sizeob); +err: + return -1; +} + + +struct default_enumerate_index_with_counter_and_foreach_data { + Dee_enumerate_index_t deiwcaf_proc; /* [1..1] Wrapped callback */ + void *deiwcaf_arg; /* [?..?] Cookie for `deiwcaf_proc' */ + size_t deiwcaf_counter; /* Index of the next element that will be enumerate_indexd */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_enumerate_index_with_counter_and_foreach_cb(void *arg, DeeObject *elem); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_enumerate_index_with_counter_and_foreach_cb(void *arg, DeeObject *elem) { + struct default_enumerate_index_with_counter_and_foreach_data *data; + data = (struct default_enumerate_index_with_counter_and_foreach_data *)arg; + return (*data->deiwcaf_proc)(data->deiwcaf_arg, data->deiwcaf_counter++, elem); +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithCounterAndForeach, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + struct default_enumerate_index_with_counter_and_foreach_data data; + LOAD_TP_SELF; + data.deiwcaf_proc = proc; + data.deiwcaf_arg = arg; + data.deiwcaf_counter = 0; + (void)starthint; + (void)endhint; + return DeeType_INVOKE_FOREACH_NODEFAULT(tp_self, self, &default_enumerate_index_with_counter_and_foreach_cb, &data); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithCounterAndIter, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + size_t counter = 0; Dee_ssize_t temp, result = 0; - size_t i, size; + DREF DeeObject *iter, *elem; LOAD_TP_SELF; - size = DeeType_INVOKE_SIZE(tp_self, self); - if unlikely(size == (size_t)-1) + iter = DeeType_INVOKE_ITER_NODEFAULT(tp_self, self); + if unlikely(!iter) goto err; - for (i = 0; i < size; ++i) { - DREF DeeObject *elem; - elem = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); - if unlikely(!elem) { - if (DeeError_Catch(&DeeError_UnboundItem)) - continue; - if (DeeError_Catch(&DeeError_IndexError)) - break; /* In case the sequence's length got truncated since we checked above. */ - goto err; - } - temp = (*proc)(arg, elem); + if (starthint != 0) { + counter = DeeObject_IterAdvance(iter, starthint); + if unlikely(counter == (size_t)-1) + goto err_iter; + if unlikely(counter < starthint) + goto done; + } + for (;; ++counter) { + if (counter >= endhint) + goto done; + elem = DeeObject_IterNext(iter); + if (!ITER_ISOK(elem)) + break; + temp = (*proc)(arg, counter, elem); Dee_Decref(elem); if unlikely(temp < 0) - return temp; + goto err_temp_iter; result += temp; + if (DeeThread_CheckInterrupt()) + goto err_iter; } + if unlikely(!elem) + goto err_iter; +done: + Dee_Decref(iter); return result; +err_temp_iter: + Dee_Decref(iter); +/*err_temp:*/ + return temp; +err_iter: + Dee_Decref(iter); err: return -1; } -DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultForeachWithGetItemIndexDefault, - (DeeObject *RESTRICT_IF_NOTYPE self, Dee_foreach_t proc, void *arg)) { +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { Dee_ssize_t temp, result = 0; - size_t i; + size_t i, size; LOAD_TP_SELF; - for (i = 0;; ++i) { - DREF DeeObject *elem; - elem = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); - if unlikely(!elem) { - if (DeeError_Catch(&DeeError_UnboundItem)) - continue; - if (DeeError_Catch(&DeeError_IndexError)) - break; - goto err; + size = DeeType_INVOKE_SIZE(tp_self, self); + if unlikely(size == (size_t)-1) + goto err; + if (endhint > size) + endhint = size; + if (starthint > endhint) + starthint = endhint; + for (i = starthint; i < endhint; ++i) { + DREF DeeObject *index_value; + index_value = DeeType_INVOKE_GETITEMINDEX(tp_self, self, i); + if unlikely(!index_value) { + if (!DeeError_Catch(&DeeError_IndexError) && + !DeeError_Catch(&DeeError_UnboundItem)) + goto err; } - temp = (*proc)(arg, elem); - Dee_Decref(elem); + temp = (*proc)(arg, i, index_value); + Dee_XDecref(index_value); if unlikely(temp < 0) - return temp; + goto err_temp; result += temp; } return result; +err_temp: + return temp; err: return -1; } +DEFINE_INTERNAL_SEQ_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithCounterAndForeachDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + struct default_enumerate_index_with_counter_and_foreach_data data; + LOAD_TP_SELF; + data.deiwcaf_proc = proc; + data.deiwcaf_arg = arg; + data.deiwcaf_counter = 0; + (void)starthint; + (void)endhint; + return DeeType_INVOKE_FOREACH(tp_self, self, &default_enumerate_index_with_counter_and_foreach_cb, &data); +} + +DEFINE_INTERNAL_OPERATOR(Dee_ssize_t, DefaultEnumerateIndexWithEnumerateDefault, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, void *arg, size_t starthint, size_t endhint)) { + struct default_enumerate_index_with_enumerate_data data; + LOAD_TP_SELF; + (void)starthint; + (void)endhint; + data.deiwe_proc = proc; + data.deiwe_arg = arg; + return DeeType_INVOKE_ENUMERATE(tp_self, self, &default_enumerate_index_with_enumerate_cb, &data); +} + + + + + + +/* tp_sizeob */ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultSizeObWithSize, (DeeObject *RESTRICT_IF_NOTYPE self)) { size_t result; @@ -6240,6 +7071,18 @@ default_size_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { } #endif /* !DEFINE_TYPED_OPERATORS */ +DEFINE_INTERNAL_SEQ_OPERATOR(size_t, DefaultSizeWithEnumerateIndex, + (DeeObject *RESTRICT_IF_NOTYPE self)) { + LOAD_TP_SELF; + return (size_t)DeeType_INVOKE_ENUMERATE_INDEX_NODEFAULT(tp_self, self, (Dee_enumerate_index_t)&default_size_with_foreach_pair_cb, NULL, 0, (size_t)-1); +} + +DEFINE_INTERNAL_SEQ_OPERATOR(size_t, DefaultSizeWithEnumerate, + (DeeObject *RESTRICT_IF_NOTYPE self)) { + LOAD_TP_SELF; + return (size_t)DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_size_with_foreach_pair_cb, NULL); +} + DEFINE_INTERNAL_SEQ_OPERATOR(size_t, DefaultSizeWithForeachPair, (DeeObject *RESTRICT_IF_NOTYPE self)) { LOAD_TP_SELF; @@ -6502,7 +7345,7 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithGetItemIndex, return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithEnumerate, (DeeObject *self, DeeObject *elem)) { LOAD_TP_SELF; /* TODO */ @@ -6513,7 +7356,7 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithForeachPair, return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithForeachDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultContainsWithEnumerateDefault, (DeeObject *self, DeeObject *elem)) { LOAD_TP_SELF; /* TODO */ @@ -6771,26 +7614,28 @@ DEFINE_INTERNAL_SEQ_OPERATOR(DREF DeeObject *, DefaultGetItemWithSizeAndTryGetIt -struct default_map_getitem_with_foreach_pair_data { - DeeObject *mgifpd_key; /* [1..1] The key we're looking for. */ - DREF DeeObject *mgifpd_result; /* [?..1][out] Result value. */ +struct default_map_getitem_with_enumerate_data { + DeeObject *mgied_key; /* [1..1] The key we're looking for. */ + DREF DeeObject *mgied_result; /* [?..1][out] Result value. */ }; INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +default_map_getitem_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { +INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL +default_map_getitem_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { int temp; - struct default_map_getitem_with_foreach_pair_data *data; - data = (struct default_map_getitem_with_foreach_pair_data *)arg; - temp = DeeObject_TryCompareEq(data->mgifpd_key, key); + struct default_map_getitem_with_enumerate_data *data; + data = (struct default_map_getitem_with_enumerate_data *)arg; + temp = DeeObject_TryCompareEq(data->mgied_key, key); if unlikely(temp == Dee_COMPARE_ERR) goto err; if (temp == 0) { + if unlikely(!value) + return -3; Dee_Incref(value); - data->mgifpd_result = value; + data->mgied_result = value; return -2; } return 0; @@ -6799,15 +7644,19 @@ default_map_getitem_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *v } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemWithEnumerate, (DeeObject *self, DeeObject *key)) { Dee_ssize_t status; - struct default_map_getitem_with_foreach_pair_data data; + struct default_map_getitem_with_enumerate_data data; LOAD_TP_SELF; - data.mgifpd_key = key; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_with_foreach_pair_cb, &data); + data.mgied_key = key; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_with_enumerate_cb, &data); if likely(status == -2) - return data.mgifpd_result; + return data.mgied_result; + if unlikely(status == -3) { + err_unbound_key(self, key); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -6816,15 +7665,19 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemWithForeachPair, return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemWithEnumerateDefault, (DeeObject *self, DeeObject *key)) { Dee_ssize_t status; - struct default_map_getitem_with_foreach_pair_data data; + struct default_map_getitem_with_enumerate_data data; LOAD_TP_SELF; - data.mgifpd_key = key; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_with_foreach_pair_cb, &data); + data.mgied_key = key; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_with_enumerate_cb, &data); if likely(status == -2) - return data.mgifpd_result; + return data.mgied_result; + if unlikely(status == -3) { + err_unbound_key(self, key); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7081,13 +7934,13 @@ DEFINE_INTERNAL_SEQ_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithForeachDef return NULL; } -struct default_map_getitem_index_with_foreach_pair_data { - size_t mgiifpd_key; /* The index we're looking for. */ - DREF DeeObject *mgiifpd_result; /* [?..1][out] Result value. */ +struct default_map_getitem_index_with_enumerate_data { + size_t mgiied_key; /* The index we're looking for. */ + DREF DeeObject *mgiied_result; /* [?..1][out] Result value. */ }; INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_index_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +default_map_getitem_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS /* @return: 1 : Not-equal @@ -7112,17 +7965,19 @@ size_t_equals_object(size_t lhs, DeeObject *rhs) { return Dee_COMPARE_ERR; } -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_index_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_getitem_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { int temp; - struct default_map_getitem_index_with_foreach_pair_data *data; - data = (struct default_map_getitem_index_with_foreach_pair_data *)arg; - temp = size_t_equals_object(data->mgiifpd_key, key); + struct default_map_getitem_index_with_enumerate_data *data; + data = (struct default_map_getitem_index_with_enumerate_data *)arg; + temp = size_t_equals_object(data->mgiied_key, key); if unlikely(temp == Dee_COMPARE_ERR) goto err; if (temp == 0) { + if unlikely(!value) + return -3; Dee_Incref(value); - data->mgiifpd_result = value; + data->mgiied_result = value; return -2; } return 0; @@ -7131,15 +7986,19 @@ default_map_getitem_index_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObj } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; - struct default_map_getitem_index_with_foreach_pair_data data; + struct default_map_getitem_index_with_enumerate_data data; LOAD_TP_SELF; - data.mgiifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_index_with_foreach_pair_cb, &data); + data.mgiied_key = index; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_index_with_enumerate_cb, &data); if likely(status == -2) - return data.mgiifpd_result; + return data.mgiied_result; + if unlikely(status == -3) { + err_unbound_index(self, index); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7148,15 +8007,19 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithForeachPai return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemIndexWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; - struct default_map_getitem_index_with_foreach_pair_data data; + struct default_map_getitem_index_with_enumerate_data data; LOAD_TP_SELF; - data.mgiifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_index_with_foreach_pair_cb, &data); + data.mgiied_key = index; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_index_with_enumerate_cb, &data); if likely(status == -2) - return data.mgiifpd_result; + return data.mgiied_result; + if unlikely(status == -3) { + err_unbound_index(self, index); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7260,14 +8123,14 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithGetItemDe return NULL; } -struct default_map_getitem_string_hash_with_foreach_pair_data { - char const *mgishfpd_key; /* [1..1] The key we're looking for. */ - Dee_hash_t mgishfpd_hash; /* Hash for `mgishfpd_key'. */ - DREF DeeObject *mgishfpd_result; /* [?..1][out] Result value. */ +struct default_map_getitem_string_hash_with_enumerate_data { + char const *mgished_key; /* [1..1] The key we're looking for. */ + Dee_hash_t mgished_hash; /* Hash for `mgished_key'. */ + DREF DeeObject *mgished_result; /* [?..1][out] Result value. */ }; INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_string_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +default_map_getitem_string_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS PRIVATE WUNUSED NONNULL((1, 3)) bool DCALL @@ -7280,29 +8143,35 @@ string_hash_equals_object(char const *lhs, Dee_hash_t lhs_hash, DeeObject *rhs) return false; } -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_string_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { - struct default_map_getitem_string_hash_with_foreach_pair_data *data; - data = (struct default_map_getitem_string_hash_with_foreach_pair_data *)arg; - if (string_hash_equals_object(data->mgishfpd_key, data->mgishfpd_hash, key)) { +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_getitem_string_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_map_getitem_string_hash_with_enumerate_data *data; + data = (struct default_map_getitem_string_hash_with_enumerate_data *)arg; + if (string_hash_equals_object(data->mgished_key, data->mgished_hash, key)) { + if unlikely(!value) + return -3; Dee_Incref(value); - data->mgishfpd_result = value; + data->mgished_result = value; return -2; } return 0; } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_hash_with_foreach_pair_data data; + struct default_map_getitem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgishfpd_key = key; - data.mgishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_string_hash_with_foreach_pair_cb, &data); + data.mgished_key = key; + data.mgished_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_string_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgishfpd_result; + return data.mgished_result; + if unlikely(status == -3) { + err_unbound_key_str(self, key); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7311,16 +8180,20 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithForea return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_hash_with_foreach_pair_data data; + struct default_map_getitem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgishfpd_key = key; - data.mgishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_string_hash_with_foreach_pair_cb, &data); + data.mgished_key = key; + data.mgished_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_string_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgishfpd_result; + return data.mgished_result; + if unlikely(status == -3) { + err_unbound_key_str(self, key); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7464,15 +8337,15 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithGetIte return NULL; } -struct default_map_getitem_string_len_hash_with_foreach_pair_data { - char const *mgislhfpd_key; /* [1..1] The key we're looking for. */ - size_t mgislhfpd_keylen; /* Length of `mgislhfpd_key'. */ - Dee_hash_t mgislhfpd_hash; /* Hash for `mgislhfpd_key'. */ - DREF DeeObject *mgislhfpd_result; /* [?..1][out] Result value. */ +struct default_map_getitem_string_len_hash_with_enumerate_data { + char const *mgislhed_key; /* [1..1] The key we're looking for. */ + size_t mgislhed_keylen; /* Length of `mgislhed_key'. */ + Dee_hash_t mgislhed_hash; /* Hash for `mgislhed_key'. */ + DREF DeeObject *mgislhed_result; /* [?..1][out] Result value. */ }; INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_string_len_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +default_map_getitem_string_len_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS PRIVATE WUNUSED NONNULL((1, 4)) bool DCALL @@ -7486,29 +8359,35 @@ string_len_hash_equals_object(char const *lhs, size_t lhs_len, Dee_hash_t lhs_ha } INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_getitem_string_len_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { - struct default_map_getitem_string_len_hash_with_foreach_pair_data *data; - data = (struct default_map_getitem_string_len_hash_with_foreach_pair_data *)arg; - if (string_len_hash_equals_object(data->mgislhfpd_key, data->mgislhfpd_keylen, data->mgislhfpd_hash, key)) { +default_map_getitem_string_len_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_map_getitem_string_len_hash_with_enumerate_data *data; + data = (struct default_map_getitem_string_len_hash_with_enumerate_data *)arg; + if (string_len_hash_equals_object(data->mgislhed_key, data->mgislhed_keylen, data->mgislhed_hash, key)) { + if unlikely(!value) + return -3; Dee_Incref(value); - data->mgislhfpd_result = value; + data->mgislhed_result = value; return -2; } return 0; } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_len_hash_with_foreach_pair_data data; + struct default_map_getitem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgislhfpd_key = key; - data.mgislhfpd_keylen = keylen; - data.mgislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_string_len_hash_with_foreach_pair_cb, &data); + data.mgislhed_key = key; + data.mgislhed_keylen = keylen; + data.mgislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_string_len_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgislhfpd_result; + return data.mgislhed_result; + if unlikely(status == -3) { + err_unbound_key_str_len(self, key, keylen); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7517,17 +8396,21 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithFo return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultGetItemStringLenHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_len_hash_with_foreach_pair_data data; + struct default_map_getitem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgislhfpd_key = key; - data.mgislhfpd_keylen = keylen; - data.mgislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_string_len_hash_with_foreach_pair_cb, &data); + data.mgislhed_key = key; + data.mgislhed_keylen = keylen; + data.mgislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_string_len_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgislhfpd_result; + return data.mgislhed_result; + if unlikely(status == -3) { + err_unbound_key_str_len(self, key, keylen); + goto err; + } ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7681,31 +8564,31 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultTryGetItemWithGetItemDefault, return result; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, DeeObject *index)) { Dee_ssize_t status; - struct default_map_getitem_with_foreach_pair_data data; + struct default_map_getitem_with_enumerate_data data; LOAD_TP_SELF; - data.mgifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_with_foreach_pair_cb, &data); + data.mgied_key = index; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_with_enumerate_cb, &data); if likely(status == -2) - return data.mgifpd_result; - if (status == 0) + return data.mgied_result; + if (status == -3 || status == 0) return ITER_DONE; ASSERT(status == -1); return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, DeeObject *index)) { Dee_ssize_t status; - struct default_map_getitem_with_foreach_pair_data data; + struct default_map_getitem_with_enumerate_data data; LOAD_TP_SELF; - data.mgifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_with_foreach_pair_cb, &data); + data.mgied_key = index; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_with_enumerate_cb, &data); if likely(status == -2) - return data.mgifpd_result; - if (status == 0) + return data.mgied_result; + if (status == -3 || status == 0) return ITER_DONE; ASSERT(status == -1); return NULL; @@ -7808,37 +8691,31 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultTryGetItemIndexWithGetItemInde return result; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemIndexWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemIndexWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; - struct default_map_getitem_index_with_foreach_pair_data data; + struct default_map_getitem_index_with_enumerate_data data; LOAD_TP_SELF; - data.mgiifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_index_with_foreach_pair_cb, &data); + data.mgiied_key = index; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_index_with_enumerate_cb, &data); if likely(status == -2) - return data.mgiifpd_result; - ASSERT(status == -1 || status == 0); - if (status < 0) - goto err; - return ITER_DONE; -err: + return data.mgiied_result; + if (status == -3 || status == 0) + return ITER_DONE; return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemIndexWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemIndexWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; - struct default_map_getitem_index_with_foreach_pair_data data; + struct default_map_getitem_index_with_enumerate_data data; LOAD_TP_SELF; - data.mgiifpd_key = index; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_index_with_foreach_pair_cb, &data); + data.mgiied_key = index; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_index_with_enumerate_cb, &data); if likely(status == -2) - return data.mgiifpd_result; - ASSERT(status == -1 || status == 0); - if (status < 0) - goto err; - return ITER_DONE; -err: + return data.mgiied_result; + if (status == -3 || status == 0) + return ITER_DONE; return NULL; } @@ -7938,16 +8815,16 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithTryGet return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_hash_with_foreach_pair_data data; + struct default_map_getitem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgishfpd_key = key; - data.mgishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_string_hash_with_foreach_pair_cb, &data); + data.mgished_key = key; + data.mgished_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_string_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgishfpd_result; + return data.mgished_result; ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -7956,16 +8833,16 @@ DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithFo return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_hash_with_foreach_pair_data data; + struct default_map_getitem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgishfpd_key = key; - data.mgishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_string_hash_with_foreach_pair_cb, &data); + data.mgished_key = key; + data.mgished_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_string_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgishfpd_result; + return data.mgished_result; ASSERT(status == -1 || status == 0); if (status < 0) goto err; @@ -8080,41 +8957,35 @@ DEFINE_INTERNAL_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringLenHashWithTry return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringLenHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringLenHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_len_hash_with_foreach_pair_data data; + struct default_map_getitem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgislhfpd_key = key; - data.mgislhfpd_keylen = keylen; - data.mgislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_getitem_string_len_hash_with_foreach_pair_cb, &data); + data.mgislhed_key = key; + data.mgislhed_keylen = keylen; + data.mgislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_getitem_string_len_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgislhfpd_result; - ASSERT(status == -1 || status == 0); - if (status < 0) - goto err; - return ITER_DONE; -err: + return data.mgislhed_result; + if (status == -3 || status == 0) + return ITER_DONE; return NULL; } -DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringLenHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(DREF DeeObject *, DefaultTryGetItemStringLenHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_getitem_string_len_hash_with_foreach_pair_data data; + struct default_map_getitem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mgislhfpd_key = key; - data.mgislhfpd_keylen = keylen; - data.mgislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_getitem_string_len_hash_with_foreach_pair_cb, &data); + data.mgislhed_key = key; + data.mgislhed_keylen = keylen; + data.mgislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_getitem_string_len_hash_with_enumerate_cb, &data); if likely(status == -2) - return data.mgislhfpd_result; - ASSERT(status == -1 || status == 0); - if (status < 0) - goto err; - return ITER_DONE; -err: + return data.mgislhed_result; + if (status == -3 || status == 0) + return ITER_DONE; return NULL; } @@ -8827,47 +9698,51 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemWithContains, return -1; } -INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { int temp; (void)value; temp = DeeObject_TryCompareEq((DeeObject *)arg, key); if unlikely(temp == Dee_COMPARE_ERR) goto err; if (temp == 0) - return -2; /* Stop iteration */ + return value ? -2 : -3; /* Stop iteration */ return 0; err: return -1; } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemWithEnumerate, (DeeObject *self, DeeObject *index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_with_foreach_pair_cb, index); - ASSERT(status == -2 || status == -1 || status == 0); + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_with_enumerate_cb, index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemWithEnumerateDefault, (DeeObject *self, DeeObject *index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_with_foreach_pair_cb, index); - ASSERT(status == -2 || status == -1 || status == 0); + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_with_enumerate_cb, index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } @@ -9098,47 +9973,51 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemIndexWithContains, return -1; } -INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_index_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); #ifndef DEFINE_TYPED_OPERATORS -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_index_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_index_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { int temp; (void)value; temp = size_t_equals_object((size_t)(uintptr_t)arg, key); if unlikely(temp == Dee_COMPARE_ERR) goto err; if (temp == 0) - return -2; + return value ? -2 : -3; return 0; err: return -1; } #endif /* !DEFINE_TYPED_OPERATORS */ -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemIndexWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemIndexWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_index_with_foreach_pair_cb, (void *)(uintptr_t)index); - ASSERT(status == -2 || status == -1 || status == 0); + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_index_with_enumerate_cb, (void *)(uintptr_t)index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemIndexWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemIndexWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_index_with_foreach_pair_cb, (void *)(uintptr_t)index); - ASSERT(status == -2 || status == -1 || status == 0); + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_index_with_enumerate_cb, (void *)(uintptr_t)index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } @@ -9360,26 +10239,6 @@ DEFINE_INTERNAL_OPERATOR(int, DefaultBoundItemStringHashWithErrorRequiresInt, } #endif /* !DEFINE_TYPED_OPERATORS */ -struct default_map_bounditem_string_hash_with_foreach_pair_data { - char const *mbishfpd_key; /* [1..1] The key we're looking for. */ - Dee_hash_t mbishfpd_hash; /* Hash for `mbishfpd_key'. */ -}; - -INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_string_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); - -#ifndef DEFINE_TYPED_OPERATORS -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_string_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { - struct default_map_bounditem_string_hash_with_foreach_pair_data *data; - (void)value; - data = (struct default_map_bounditem_string_hash_with_foreach_pair_data *)arg; - if (string_hash_equals_object(data->mbishfpd_key, data->mbishfpd_hash, key)) - return -2; - return 0; -} -#endif /* !DEFINE_TYPED_OPERATORS */ - DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithContains, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { int result_status; @@ -9399,34 +10258,58 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithForeachPair, +struct default_map_bounditem_string_hash_with_enumerate_data { + char const *mbished_key; /* [1..1] The key we're looking for. */ + Dee_hash_t mbished_hash; /* Hash for `mbished_key'. */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_string_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_string_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_map_bounditem_string_hash_with_enumerate_data *data; + (void)value; + data = (struct default_map_bounditem_string_hash_with_enumerate_data *)arg; + if (string_hash_equals_object(data->mbished_key, data->mbished_hash, key)) + return value ? -2 : -3; + return 0; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbishfpd_key = key; - data.mbishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_string_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); + data.mbished_key = key; + data.mbished_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_string_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbishfpd_key = key; - data.mbishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_string_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); + data.mbished_key = key; + data.mbished_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_string_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } @@ -9664,27 +10547,6 @@ DEFINE_INTERNAL_OPERATOR(int, DefaultBoundItemStringLenHashWithErrorRequiresInt, } #endif /* !DEFINE_TYPED_OPERATORS */ -struct default_map_bounditem_string_len_hash_with_foreach_pair_data { - char const *mbislhfpd_key; /* [1..1] The key we're looking for. */ - size_t mbislhfpd_keylen; /* Length of `mbislhfpd_key'. */ - Dee_hash_t mbislhfpd_hash; /* Hash for `mbislhfpd_key'. */ -}; - -INTDEF WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_string_len_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value); - -#ifndef DEFINE_TYPED_OPERATORS -INTERN WUNUSED NONNULL((1, 2, 3)) Dee_ssize_t DCALL -default_map_bounditem_string_len_hash_with_foreach_pair_cb(void *arg, DeeObject *key, DeeObject *value) { - struct default_map_bounditem_string_len_hash_with_foreach_pair_data *data; - (void)value; - data = (struct default_map_bounditem_string_len_hash_with_foreach_pair_data *)arg; - if (string_len_hash_equals_object(data->mbislhfpd_key, data->mbislhfpd_keylen, data->mbislhfpd_hash, key)) - return -2; - return 0; -} -#endif /* !DEFINE_TYPED_OPERATORS */ - DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithContains, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { int result_status; @@ -9704,36 +10566,61 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithForeachPair, +struct default_map_bounditem_string_len_hash_with_enumerate_data { + char const *mbislhed_key; /* [1..1] The key we're looking for. */ + size_t mbislhed_keylen; /* Length of `mbislhed_key'. */ + Dee_hash_t mbislhed_hash; /* Hash for `mbislhed_key'. */ +}; + +INTDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_string_len_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value); + +#ifndef DEFINE_TYPED_OPERATORS +INTERN WUNUSED NONNULL((1, 2)) Dee_ssize_t DCALL +default_map_bounditem_string_len_hash_with_enumerate_cb(void *arg, DeeObject *key, DeeObject *value) { + struct default_map_bounditem_string_len_hash_with_enumerate_data *data; + (void)value; + data = (struct default_map_bounditem_string_len_hash_with_enumerate_data *)arg; + if (string_len_hash_equals_object(data->mbislhed_key, data->mbislhed_keylen, data->mbislhed_hash, key)) + return value ? -2 : -3; + return 0; +} +#endif /* !DEFINE_TYPED_OPERATORS */ + +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_len_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbislhfpd_key = key; - data.mbislhfpd_keylen = keylen; - data.mbislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_string_len_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); + data.mbislhed_key = key; + data.mbislhed_keylen = keylen; + data.mbislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_string_len_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultBoundItemStringLenHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_len_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_len_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbislhfpd_key = key; - data.mbislhfpd_keylen = keylen; - data.mbislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_string_len_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); + data.mbislhed_key = key; + data.mbislhed_keylen = keylen; + data.mbislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_string_len_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); if (status == -2) { status = 1; + } else if (status == -3) { + status = 0; } else if (status == 0) { status = -2; } @@ -10045,24 +10932,24 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemWithEnumerate, (DeeObject *self, DeeObject *index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_with_foreach_pair_cb, index); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_with_enumerate_cb, index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemWithEnumerateDefault, (DeeObject *self, DeeObject *index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_with_foreach_pair_cb, index); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_with_enumerate_cb, index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } @@ -10251,24 +11138,24 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemIndexWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemIndexWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemIndexWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_index_with_foreach_pair_cb, (void *)(uintptr_t)index); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_index_with_enumerate_cb, (void *)(uintptr_t)index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemIndexWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemIndexWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, size_t index)) { Dee_ssize_t status; LOAD_TP_SELF; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_index_with_foreach_pair_cb, (void *)(uintptr_t)index); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_index_with_enumerate_cb, (void *)(uintptr_t)index); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } @@ -10484,30 +11371,30 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringHashWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbishfpd_key = key; - data.mbishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_string_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + data.mbished_key = key; + data.mbished_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_string_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_hash_with_foreach_pair_data data; + struct default_map_bounditem_string_hash_with_enumerate_data data; LOAD_TP_SELF; - data.mbishfpd_key = key; - data.mbishfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_string_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + data.mbished_key = key; + data.mbished_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_string_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } @@ -10739,32 +11626,32 @@ DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringLenHashWithContains, return -1; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringLenHashWithForeachPair, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringLenHashWithEnumerate, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_len_hash_with_foreach_pair_data data; - LOAD_TP_SELF; - data.mbislhfpd_key = key; - data.mbislhfpd_keylen = keylen; - data.mbislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR_NODEFAULT(tp_self, self, &default_map_bounditem_string_len_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + struct default_map_bounditem_string_len_hash_with_enumerate_data data; + LOAD_TP_SELF; + data.mbislhed_key = key; + data.mbislhed_keylen = keylen; + data.mbislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE_NODEFAULT(tp_self, self, &default_map_bounditem_string_len_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } -DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringLenHashWithForeachPairDefault, +DEFINE_INTERNAL_MAP_OPERATOR(int, DefaultHasItemStringLenHashWithEnumerateDefault, (DeeObject *RESTRICT_IF_NOTYPE self, char const *key, size_t keylen, Dee_hash_t hash)) { Dee_ssize_t status; - struct default_map_bounditem_string_len_hash_with_foreach_pair_data data; - LOAD_TP_SELF; - data.mbislhfpd_key = key; - data.mbislhfpd_keylen = keylen; - data.mbislhfpd_hash = hash; - status = DeeType_INVOKE_FOREACH_PAIR(tp_self, self, &default_map_bounditem_string_len_hash_with_foreach_pair_cb, &data); - ASSERT(status == -2 || status == -1 || status == 0); - if (status == -2) + struct default_map_bounditem_string_len_hash_with_enumerate_data data; + LOAD_TP_SELF; + data.mbislhed_key = key; + data.mbislhed_keylen = keylen; + data.mbislhed_hash = hash; + status = DeeType_INVOKE_ENUMERATE(tp_self, self, &default_map_bounditem_string_len_hash_with_enumerate_cb, &data); + ASSERT(status == -3 || status == -2 || status == -1 || status == 0); + if (status == -3 || status == -2) status = 1; return (int)status; } @@ -12155,6 +13042,20 @@ DeeObject_AddUInt32(DeeObject *__restrict self, uint32_t val) { return NULL; } +PUBLIC WUNUSED NONNULL((1)) DREF DeeObject *DCALL +DeeObject_AddUInt64(DeeObject *__restrict self, uint64_t val) { + DREF DeeObject *val_ob, *result; + /* TODO: Optimization for `int' */ + val_ob = DeeInt_NewUInt64(val); + if unlikely(!val_ob) + goto err; + result = DeeObject_Add(self, val_ob); + Dee_Decref(val_ob); + return result; +err: + return NULL; +} + PUBLIC WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_SubUInt32(DeeObject *__restrict self, uint32_t val) { DREF DeeObject *val_ob, *result; @@ -12171,6 +13072,20 @@ DeeObject_SubUInt32(DeeObject *__restrict self, uint32_t val) { return NULL; } +PUBLIC WUNUSED NONNULL((1)) DREF DeeObject *DCALL +DeeObject_SubUInt64(DeeObject *__restrict self, uint64_t val) { + DREF DeeObject *val_ob, *result; + /* TODO: Optimization for `int' */ + val_ob = DeeInt_NewUInt64(val); + if unlikely(!val_ob) + goto err; + result = DeeObject_Sub(self, val_ob); + Dee_Decref(val_ob); + return result; +err: + return NULL; +} + PUBLIC WUNUSED NONNULL((1)) DREF DeeObject *DCALL DeeObject_MulInt8(DeeObject *__restrict self, int8_t val) { DREF DeeObject *val_ob, *result; @@ -12680,6 +13595,8 @@ enum seq_feature { FEAT_tp_setrange, FEAT_tp_foreach, FEAT_tp_foreach_pair, + FEAT_tp_enumerate, + FEAT_tp_enumerate_index, FEAT_tp_bounditem, FEAT_tp_hasitem, FEAT_tp_size, @@ -12848,7 +13765,7 @@ Dee_type_seq_has_custom_tp_setitem_string_len_hash(struct type_seq const *__rest /* Initialize "self" from features of "seq" */ PRIVATE NONNULL((1, 2)) void DCALL -seq_featureset_init(seq_featureset_t self, struct type_seq const *__restrict seq) { +seq_featureset_init(seq_featureset_t self, struct type_seq *__restrict seq, unsigned int seqclass) { seq_featureset_clear(self); /* Figure out what the type can do natively. */ if (seq->tp_iter && !DeeType_IsDefaultIter(seq->tp_iter)) @@ -12871,8 +13788,16 @@ seq_featureset_init(seq_featureset_t self, struct type_seq const *__restrict seq seq_featureset_set(self, FEAT_tp_setrange); if (Dee_type_seq_has_custom_tp_foreach(seq)) seq_featureset_set(self, FEAT_tp_foreach); - if (seq->tp_foreach_pair && !DeeType_IsDefaultForeachPair(seq->tp_foreach_pair)) + if (seq->tp_foreach_pair && !DeeType_IsDefaultForeachPair(seq->tp_foreach_pair)) { seq_featureset_set(self, FEAT_tp_foreach_pair); + seq_featureset_set(self, FEAT_tp_enumerate); + if (seq->tp_enumerate == NULL && seqclass == Dee_SEQCLASS_MAP) /* Binary compatible! (so cheat a little) */ + seq->tp_enumerate = seq->tp_foreach_pair; + } else if (seq->tp_enumerate && !DeeType_IsDefaultEnumerate(seq->tp_enumerate)) { + seq_featureset_set(self, FEAT_tp_enumerate); + } + if (seq->tp_enumerate_index && !DeeType_IsDefaultEnumerateIndex(seq->tp_enumerate_index)) + seq_featureset_set(self, FEAT_tp_enumerate_index); if (seq->tp_bounditem && !DeeType_IsDefaultBoundItem(seq->tp_bounditem)) seq_featureset_set(self, FEAT_tp_bounditem); if (seq->tp_hasitem && !DeeType_IsDefaultHasItem(seq->tp_hasitem)) @@ -12959,6 +13884,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_iter = &DeeObject_DefaultIterWithForeach; } else if (seq_featureset_test(features, FEAT_tp_foreach_pair)) { seq->tp_iter = &DeeObject_DefaultIterWithForeachPair; + } else if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_iter = &DeeObject_DefaultIterWithEnumerate; + } else if (seq_featureset_test(features, FEAT_tp_enumerate_index)) { + seq->tp_iter = &DeeObject_DefaultIterWithEnumerateIndex; } } @@ -12966,6 +13895,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat if (!seq->tp_size) { if (seq_featureset_test(features, FEAT_tp_sizeob)) { seq->tp_size = &DeeObject_DefaultSizeWithSizeOb; + } else if (seq_featureset_test(features, FEAT_tp_enumerate_index)) { + seq->tp_size = &DeeSeq_DefaultSizeWithEnumerateIndex; + } else if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_size = &DeeSeq_DefaultSizeWithEnumerate; } else if (seq_featureset_test(features, FEAT_tp_foreach)) { seq->tp_size = &DeeSeq_DefaultSizeWithForeach; } else if (seq_featureset_test(features, FEAT_tp_foreach_pair)) { @@ -12999,6 +13932,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat } else if (seq_featureset_test(features, FEAT_tp_sizeob) && seq_featureset_test(features, FEAT_tp_getitem) && seqclass == Dee_SEQCLASS_SEQ) { seq->tp_foreach = &DeeSeq_DefaultForeachWithSizeObAndGetItem; + } else if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_foreach = &DeeObject_DefaultForeachWithEnumerate; + } else if (seq_featureset_test(features, FEAT_tp_enumerate_index)) { + seq->tp_foreach = &DeeObject_DefaultForeachWithEnumerateIndex; } else if (seq_featureset_test(features, FEAT_tp_iter)) { seq->tp_foreach = &DeeObject_DefaultForeachWithIter; } else if (seq->tp_size && @@ -13050,8 +13987,8 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_contains = &DeeMap_DefaultContainsWithGetItemStringLenHash; } else if (seq_featureset_test(features, FEAT_tp_getitem_index)) { seq->tp_contains = &DeeMap_DefaultContainsWithGetItemIndex; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair)) { - seq->tp_contains = &DeeMap_DefaultContainsWithForeachPair; + } else if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_contains = &DeeMap_DefaultContainsWithEnumerate; } } @@ -13087,8 +14024,8 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_getitem = &DeeObject_DefaultGetItemWithTryGetItemStringLenHash; } else if (seq_featureset_test(features, FEAT_tp_trygetitem)) { seq->tp_getitem = &DeeObject_DefaultGetItemWithTryGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem = &DeeMap_DefaultGetItemWithForeachPair; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem = &DeeMap_DefaultGetItemWithEnumerate; } } @@ -13116,8 +14053,8 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_getitem_index = &DeeObject_DefaultGetItemIndexWithTryGetItem; } else if (seq->tp_foreach && seqclass == Dee_SEQCLASS_SEQ) { seq->tp_getitem_index = &DeeSeq_DefaultGetItemIndexWithForeachDefault; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem_index = &DeeMap_DefaultGetItemIndexWithForeachPair; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem_index = &DeeMap_DefaultGetItemIndexWithEnumerate; } else if (seq_featureset_test(features, FEAT_tp_trygetitem_string_hash) || seq_featureset_test(features, FEAT_tp_trygetitem_string_len_hash) || seq_featureset_test(features, FEAT_tp_getitem_string_hash) || @@ -13137,47 +14074,117 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat } } + /* tp_contains */ + if (!seq->tp_contains) { + if (seqclass == Dee_SEQCLASS_MAP && seq->tp_enumerate) { + seq->tp_contains = &DeeMap_DefaultContainsWithEnumerateDefault; + } else if (seqclass == Dee_SEQCLASS_SEQ && seq->tp_foreach) { + seq->tp_contains = &DeeSeq_DefaultContainsWithForeachDefault; + } + } + /* tp_foreach_pair */ if (!seq->tp_foreach_pair) { if (seq_featureset_test(features, FEAT_tp_foreach)) { seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithForeach; } else if (seq_featureset_test(features, FEAT_tp_iter)) { seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithIter; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_foreach_pair = &DeeMap_DefaultForeachPairWithEnumerate; + } else if (seq_featureset_test(features, FEAT_tp_enumerate_index) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_foreach_pair = &DeeMap_DefaultForeachPairWithEnumerateIndex; + } else if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithEnumerate; + } else if (seq_featureset_test(features, FEAT_tp_enumerate_index)) { + seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithEnumerateIndex; } else if (seq->tp_foreach) { seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithForeachDefault; } } - /* tp_contains */ - if (!seq->tp_contains && seq->tp_foreach) { - if (seqclass == Dee_SEQCLASS_MAP) { - seq->tp_contains = &DeeMap_DefaultContainsWithForeachDefault; - } else { - seq->tp_contains = &DeeSeq_DefaultContainsWithForeachDefault; + /* tp_enumerate */ + if (!seq->tp_enumerate) { + if (seq_featureset_test(features, FEAT_tp_enumerate_index)) { + seq->tp_enumerate = &DeeObject_DefaultEnumerateWithEnumerateIndex; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq->tp_getitem_index_fast) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndexFast; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq_featureset_test(features, FEAT_tp_trygetitem_index) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithSizeAndTryGetItemIndex; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq_featureset_test(features, FEAT_tp_getitem_index) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithSizeAndGetItemIndex; + } else if (seq_featureset_test(features, FEAT_tp_sizeob) && seq_featureset_test(features, FEAT_tp_getitem) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithSizeObAndGetItem; + } else if (seq_featureset_test(features, FEAT_tp_foreach) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithCounterAndForeach; + } else if (seq_featureset_test(features, FEAT_tp_iter) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithCounterAndIter; + } else if (seq_featureset_test(features, FEAT_tp_iter) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_enumerate = &DeeMap_DefaultEnumerateWithIter; + } else if (seq->tp_size && seq->tp_getitem_index && seqclass == Dee_SEQCLASS_SEQ) { + if (seq->tp_size == &DeeSeq_DefaultSizeWithForeachPair || + seq->tp_size == &DeeSeq_DefaultSizeWithForeach || + seq->tp_size == &DeeSeq_DefaultSizeWithIter || + seq->tp_getitem_index == &DeeSeq_DefaultGetItemIndexWithForeachDefault) { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithCounterAndForeachDefault; + } else { + seq->tp_enumerate = &DeeSeq_DefaultEnumerateWithSizeDefaultAndGetItemIndexDefault; + } + } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_enumerate = &DeeMap_DefaultEnumerateWithForeachPairDefault; } } /* tp_getitem */ if (!seq->tp_getitem) { - if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem = &DeeMap_DefaultGetItemWithForeachPairDefault; + if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem = &DeeMap_DefaultGetItemWithEnumerateDefault; } else if (seq->tp_getitem_index) { seq->tp_getitem = &DeeObject_DefaultGetItemWithGetItemIndexDefault; } } /* tp_getitem_index */ - if (!seq->tp_getitem_index && seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) - seq->tp_getitem_index = &DeeMap_DefaultGetItemIndexWithForeachPairDefault; + if (!seq->tp_getitem_index && seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) + seq->tp_getitem_index = &DeeMap_DefaultGetItemIndexWithEnumerateDefault; - /* tp_delitem_index */ + /* tp_delitem_index */ if (!seq->tp_delitem_index && seq_featureset_test(features, FEAT_tp_delitem)) seq->tp_delitem_index = &DeeObject_DefaultDelItemIndexWithDelItem; - /* tp_setitem_index */ + /* tp_setitem_index */ if (!seq->tp_setitem_index && seq_featureset_test(features, FEAT_tp_setitem)) seq->tp_setitem_index = &DeeObject_DefaultSetItemIndexWithSetItem; + /* tp_enumerate_index */ + if (!seq->tp_enumerate_index) { + if (seq_featureset_test(features, FEAT_tp_enumerate)) { + seq->tp_enumerate_index = &DeeObject_DefaultEnumerateIndexWithEnumerate; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq->tp_getitem_index_fast) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndexFast; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq_featureset_test(features, FEAT_tp_trygetitem_index) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithSizeAndTryGetItemIndex; + } else if (seq_featureset_test(features, FEAT_tp_size) && seq_featureset_test(features, FEAT_tp_getitem_index) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithSizeAndGetItemIndex; + } else if (seq_featureset_test(features, FEAT_tp_sizeob) && seq_featureset_test(features, FEAT_tp_getitem) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithSizeObAndGetItem; + } else if (seq_featureset_test(features, FEAT_tp_foreach) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithCounterAndForeach; + } else if (seq_featureset_test(features, FEAT_tp_iter) && seqclass == Dee_SEQCLASS_SEQ) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithCounterAndIter; + } else if (seq->tp_size && seq->tp_getitem_index && seqclass == Dee_SEQCLASS_SEQ) { + if (seq->tp_size == &DeeSeq_DefaultSizeWithForeachPair || + seq->tp_size == &DeeSeq_DefaultSizeWithForeach || + seq->tp_size == &DeeSeq_DefaultSizeWithIter || + seq->tp_getitem_index == &DeeSeq_DefaultGetItemIndexWithForeachDefault) { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithCounterAndForeachDefault; + } else { + seq->tp_enumerate_index = &DeeSeq_DefaultEnumerateIndexWithSizeDefaultAndGetItemIndexDefault; + } + } else if (seq->tp_enumerate) { + seq->tp_enumerate_index = &DeeObject_DefaultEnumerateIndexWithEnumerateDefault; + } + } + /* tp_setrange_index */ if (!seq->tp_setrange_index) { if (seq_featureset_test(features, FEAT_tp_setrange)) { @@ -13432,10 +14439,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_bounditem_index = &DeeSeq_DefaultBoundItemIndexWithSizeAndTryGetItemIndex; } else if (seq_featureset_test(features, FEAT_tp_trygetitem) && seq_featureset_test(features, FEAT_tp_sizeob) && seqclass == Dee_SEQCLASS_SEQ) { seq->tp_bounditem_index = &DeeSeq_DefaultBoundItemIndexWithTryGetItemAndSizeOb; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_index = &DeeMap_DefaultBoundItemIndexWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_index = &DeeMap_DefaultBoundItemIndexWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_index = &DeeMap_DefaultBoundItemIndexWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_index = &DeeMap_DefaultBoundItemIndexWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_bounditem_string_hash) || seq_featureset_test(features, FEAT_tp_bounditem_string_len_hash) || seq_featureset_test(features, FEAT_tp_getitem_string_hash) || @@ -13468,10 +14475,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_bounditem = &DeeObject_DefaultBoundItemWithGetItemIndex; } else if (seq_featureset_test(features, FEAT_tp_contains) && seqclass == Dee_SEQCLASS_MAP) { seq->tp_bounditem = &DeeMap_DefaultBoundItemWithContains; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem = &DeeMap_DefaultBoundItemWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem = &DeeMap_DefaultBoundItemWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem = &DeeMap_DefaultBoundItemWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem = &DeeMap_DefaultBoundItemWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_trygetitem) && seq_featureset_test(features, FEAT_tp_hasitem)) { seq->tp_bounditem = &DeeObject_DefaultBoundItemWithTryGetItemAndHasItem; } else if (seq_featureset_test(features, FEAT_tp_trygetitem_index) && seq_featureset_test(features, FEAT_tp_hasitem_index)) { @@ -13526,10 +14533,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq_featureset_test(features, FEAT_tp_getitem_string_hash) || seq_featureset_test(features, FEAT_tp_getitem_string_len_hash)) { seq->tp_hasitem_index = &DeeObject_DefaultHasItemIndexWithErrorRequiresString; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_index = &DeeMap_DefaultHasItemIndexWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_index = &DeeMap_DefaultHasItemIndexWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_index = &DeeMap_DefaultHasItemIndexWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_index = &DeeMap_DefaultHasItemIndexWithEnumerateDefault; } else if (seq->tp_size && seqclass == Dee_SEQCLASS_SEQ) { seq->tp_hasitem_index = &DeeSeq_DefaultHasItemIndexWithSizeDefault; } else if (seq->tp_getitem_index) { @@ -13575,10 +14582,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_hasitem = &DeeObject_DefaultHasItemWithGetItemStringLenHash; } else if (seq_featureset_test(features, FEAT_tp_getitem_index)) { seq->tp_hasitem = &DeeObject_DefaultHasItemWithGetItemIndex; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem = &DeeMap_DefaultHasItemWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem = &DeeMap_DefaultHasItemWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem = &DeeMap_DefaultHasItemWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem = &DeeMap_DefaultHasItemWithEnumerateDefault; } else if (seq->tp_getitem_index) { seq->tp_hasitem = &DeeObject_DefaultHasItemWithGetItemDefault; } @@ -13602,10 +14609,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_trygetitem = &DeeObject_DefaultTryGetItemWithGetItemStringHash; } else if (seq_featureset_test(features, FEAT_tp_getitem_string_len_hash)) { seq->tp_trygetitem = &DeeObject_DefaultTryGetItemWithGetItemStringLenHash; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem = &DeeMap_DefaultTryGetItemWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem = &DeeMap_DefaultTryGetItemWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem = &DeeMap_DefaultTryGetItemWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem = &DeeMap_DefaultTryGetItemWithEnumerateDefault; } else if (seq->tp_getitem) { seq->tp_trygetitem = &DeeObject_DefaultTryGetItemWithGetItemDefault; } @@ -13626,10 +14633,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq_featureset_test(features, FEAT_tp_getitem_string_hash) || seq_featureset_test(features, FEAT_tp_getitem_string_len_hash)) { seq->tp_trygetitem_index = &DeeObject_DefaultTryGetItemIndexWithErrorRequiresString; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_index = &DeeMap_DefaultTryGetItemIndexWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_index = &DeeMap_DefaultTryGetItemIndexWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_index = &DeeMap_DefaultTryGetItemIndexWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_index = &DeeMap_DefaultTryGetItemIndexWithEnumerateDefault; } else if (seq->tp_getitem_index) { seq->tp_trygetitem_index = &DeeObject_DefaultTryGetItemIndexWithGetItemIndexDefault; } @@ -13647,10 +14654,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_trygetitem_string_hash = &DeeObject_DefaultTryGetItemStringHashWithGetItemStringLenHash; } else if (seq_featureset_test(features, FEAT_tp_getitem)) { seq->tp_trygetitem_string_hash = &DeeObject_DefaultTryGetItemStringHashWithGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_string_hash = &DeeMap_DefaultTryGetItemStringHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_string_hash = &DeeMap_DefaultTryGetItemStringHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_string_hash = &DeeMap_DefaultTryGetItemStringHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_string_hash = &DeeMap_DefaultTryGetItemStringHashWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { seq->tp_trygetitem_string_hash = &DeeObject_DefaultTryGetItemStringHashWithErrorRequiresInt; @@ -13671,10 +14678,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_trygetitem_string_len_hash = &DeeObject_DefaultTryGetItemStringLenHashWithGetItemStringHash; } else if (seq_featureset_test(features, FEAT_tp_getitem)) { seq->tp_trygetitem_string_len_hash = &DeeObject_DefaultTryGetItemStringLenHashWithGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_string_len_hash = &DeeMap_DefaultTryGetItemStringLenHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_trygetitem_string_len_hash = &DeeMap_DefaultTryGetItemStringLenHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_string_len_hash = &DeeMap_DefaultTryGetItemStringLenHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_trygetitem_string_len_hash = &DeeMap_DefaultTryGetItemStringLenHashWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { seq->tp_trygetitem_string_len_hash = &DeeObject_DefaultTryGetItemStringLenHashWithErrorRequiresInt; @@ -13698,10 +14705,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat } else if (seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { seq->tp_getitem_string_hash = &DeeObject_DefaultGetItemStringHashWithErrorRequiresInt; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem_string_hash = &DeeMap_DefaultGetItemStringHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem_string_hash = &DeeMap_DefaultGetItemStringHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem_string_hash = &DeeMap_DefaultGetItemStringHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem_string_hash = &DeeMap_DefaultGetItemStringHashWithEnumerateDefault; } else if (seq->tp_getitem) { seq->tp_getitem_string_hash = &DeeObject_DefaultGetItemStringHashWithGetItemDefault; } @@ -13722,10 +14729,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat } else if (seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { seq->tp_getitem_string_len_hash = &DeeObject_DefaultGetItemStringLenHashWithErrorRequiresInt; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem_string_len_hash = &DeeMap_DefaultGetItemStringLenHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_getitem_string_len_hash = &DeeMap_DefaultGetItemStringLenHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem_string_len_hash = &DeeMap_DefaultGetItemStringLenHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_getitem_string_len_hash = &DeeMap_DefaultGetItemStringLenHashWithEnumerateDefault; } else if (seq->tp_getitem) { seq->tp_getitem_string_len_hash = &DeeObject_DefaultGetItemStringLenHashWithGetItemDefault; } @@ -13757,10 +14764,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_bounditem_string_hash = &DeeMap_DefaultBoundItemStringHashWithContains; } else if (seq_featureset_test(features, FEAT_tp_trygetitem)) { seq->tp_bounditem_string_hash = &DeeObject_DefaultBoundItemStringHashWithTryGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_string_hash = &DeeMap_DefaultBoundItemStringHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_string_hash = &DeeMap_DefaultBoundItemStringHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_string_hash = &DeeMap_DefaultBoundItemStringHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_string_hash = &DeeMap_DefaultBoundItemStringHashWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_bounditem_index) || seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { @@ -13800,10 +14807,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq_featureset_test(features, FEAT_tp_getitem_index) || seq_featureset_test(features, FEAT_tp_trygetitem_index) || seq->tp_getitem_index_fast) { seq->tp_bounditem_string_len_hash = &DeeObject_DefaultBoundItemStringLenHashWithErrorRequiresInt; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_string_len_hash = &DeeMap_DefaultBoundItemStringLenHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_bounditem_string_len_hash = &DeeMap_DefaultBoundItemStringLenHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_string_len_hash = &DeeMap_DefaultBoundItemStringLenHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_bounditem_string_len_hash = &DeeMap_DefaultBoundItemStringLenHashWithEnumerateDefault; } else if (seq->tp_bounditem) { seq->tp_bounditem_string_len_hash = &DeeObject_DefaultBoundItemStringLenHashWithBoundItemDefault; } @@ -13835,10 +14842,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_hasitem_string_hash = &DeeObject_DefaultHasItemStringHashWithTryGetItem; } else if (seq_featureset_test(features, FEAT_tp_getitem)) { seq->tp_hasitem_string_hash = &DeeObject_DefaultHasItemStringHashWithGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_string_hash = &DeeMap_DefaultHasItemStringHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_string_hash = &DeeMap_DefaultHasItemStringHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_string_hash = &DeeMap_DefaultHasItemStringHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_string_hash = &DeeMap_DefaultHasItemStringHashWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_hasitem_index) || seq_featureset_test(features, FEAT_tp_bounditem_index) || seq_featureset_test(features, FEAT_tp_getitem_index) || @@ -13876,10 +14883,10 @@ DeeSeqType_SubstituteDefaultOperators(DeeTypeObject *self, seq_featureset_t feat seq->tp_hasitem_string_len_hash = &DeeObject_DefaultHasItemStringLenHashWithTryGetItem; } else if (seq_featureset_test(features, FEAT_tp_getitem)) { seq->tp_hasitem_string_len_hash = &DeeObject_DefaultHasItemStringLenHashWithGetItem; - } else if (seq_featureset_test(features, FEAT_tp_foreach_pair) && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_string_len_hash = &DeeMap_DefaultHasItemStringLenHashWithForeachPair; - } else if (seq->tp_foreach_pair && seqclass == Dee_SEQCLASS_MAP) { - seq->tp_hasitem_string_len_hash = &DeeMap_DefaultHasItemStringLenHashWithForeachPairDefault; + } else if (seq_featureset_test(features, FEAT_tp_enumerate) && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_string_len_hash = &DeeMap_DefaultHasItemStringLenHashWithEnumerate; + } else if (seq->tp_enumerate && seqclass == Dee_SEQCLASS_MAP) { + seq->tp_hasitem_string_len_hash = &DeeMap_DefaultHasItemStringLenHashWithEnumerateDefault; } else if (seq_featureset_test(features, FEAT_tp_hasitem_index) || seq_featureset_test(features, FEAT_tp_bounditem_index) || seq_featureset_test(features, FEAT_tp_getitem_index) || @@ -14036,7 +15043,7 @@ DeeType_InheritSeqOperators(DeeTypeObject *__restrict self, unsigned int seqclas base_seq = self->tp_seq; if (base_seq) { seq_featureset_t features; - seq_featureset_init(features, base_seq); + seq_featureset_init(features, base_seq, seqclass); /* If the type is implementing sequence features, auto-complete those * features and don't try to import operators from base classes (when @@ -14072,6 +15079,8 @@ DeeType_InheritSeqOperators(DeeTypeObject *__restrict self, unsigned int seqclas self->tp_seq->tp_nsi = base_seq->tp_nsi; self->tp_seq->tp_foreach = base_seq->tp_foreach; self->tp_seq->tp_foreach_pair = base_seq->tp_foreach_pair; + self->tp_seq->tp_enumerate = base_seq->tp_enumerate; + self->tp_seq->tp_enumerate_index = base_seq->tp_enumerate_index; self->tp_seq->tp_bounditem = base_seq->tp_bounditem; self->tp_seq->tp_hasitem = base_seq->tp_hasitem; self->tp_seq->tp_size = base_seq->tp_size; @@ -14140,6 +15149,17 @@ DeeType_InheritIter(DeeTypeObject *__restrict self) { base_seq->tp_iter = &DeeObject_DefaultIterWithForeachPair; base_seq->tp_foreach = &DeeObject_DefaultForeachWithForeachPair; return true; + } else if (base_seq->tp_enumerate) { + base_seq->tp_iter = &DeeObject_DefaultIterWithEnumerate; + base_seq->tp_foreach = &DeeObject_DefaultForeachWithEnumerate; + base_seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithEnumerate; + if (base_seq->tp_enumerate_index == NULL) + base_seq->tp_enumerate_index = &DeeObject_DefaultEnumerateIndexWithEnumerate; + } else if (base_seq->tp_enumerate_index) { + base_seq->tp_iter = &DeeObject_DefaultIterWithEnumerateIndex; + base_seq->tp_foreach = &DeeObject_DefaultForeachWithEnumerateIndex; + base_seq->tp_foreach_pair = &DeeObject_DefaultForeachPairWithEnumerateIndex; + base_seq->tp_enumerate = &DeeObject_DefaultEnumerateWithEnumerateIndex; } } base = DeeTypeMRO_Init(&mro, self); @@ -17464,6 +18484,41 @@ DEFINE_OPERATOR(Dee_ssize_t, ForeachPair, return err_unimplemented_operator(tp_self, OPERATOR_ITER); } +/* Enumerate valid keys/indices of "self", as well as their current value. + * @return: * : Sum of return values of `*proc' + * @return: -1: An error occurred during iteration (or potentially inside of `*proc') */ +DEFINE_OPERATOR(Dee_ssize_t, Enumerate, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_t proc, void *arg)) { + LOAD_TP_SELF; + if likely(likely(tp_self->tp_seq && tp_self->tp_seq->tp_enumerate) || + unlikely(DeeType_InheritIter(tp_self) && tp_self->tp_seq->tp_enumerate)) + return (*tp_self->tp_seq->tp_enumerate)(self, proc, arg); + return DeeError_Throwf(&DeeError_NotImplemented, + "Cannot enumerate non-sequence type `%r'", + tp_self); +} + +/* Same as `DeeObject_Enumerate()', but only valid when "self" uses integers for indices + * or is a mapping where all keys are integers. In the former case, [starthint,endhint) + * can be given in order to allow the implementation to only enumerate indices that fall + * within that range (though an implementation is allowed to simply ignore these arguments) + * If you want to always enumerate all indices (like is also done by `DeeObject_Enumerate', + * then simply pass `starthint = 0, endhint = (size_t)-1') + * @return: * : Sum of return values of `*proc' + * @return: -1: An error occurred during iteration (or potentially inside of `*proc') */ +DEFINE_OPERATOR(Dee_ssize_t, EnumerateIndex, + (DeeObject *RESTRICT_IF_NOTYPE self, Dee_enumerate_index_t proc, + void *arg, size_t starthint, size_t endhint)) { + LOAD_TP_SELF; + if likely(likely(tp_self->tp_seq && tp_self->tp_seq->tp_enumerate_index) || + unlikely(DeeType_InheritIter(tp_self) && tp_self->tp_seq->tp_enumerate_index)) + return (*tp_self->tp_seq->tp_enumerate_index)(self, proc, arg, starthint, endhint); + return DeeError_Throwf(&DeeError_NotImplemented, + "Cannot enumerate non-sequence type `%r'", + tp_self); +} + + #ifndef DEFINE_TYPED_OPERATORS PUBLIC WUNUSED ATTR_OUTS(3, 2) NONNULL((1)) int (DCALL DeeObject_Unpack)(DeeObject *__restrict self, size_t objc, diff --git a/src/deemon/runtime/runtime_error.c b/src/deemon/runtime/runtime_error.c index 727670adf..545a86a27 100644 --- a/src/deemon/runtime/runtime_error.c +++ b/src/deemon/runtime/runtime_error.c @@ -301,6 +301,22 @@ INTERN ATTR_COLD NONNULL((1, 2)) int key, Dee_TYPE(self), self); } +INTERN ATTR_COLD NONNULL((1, 2)) int +(DCALL err_unbound_key_str)(DeeObject *self, char const *key) { + ASSERT_OBJECT(self); + return DeeError_Throwf(&DeeError_UnboundItem, + "Key `%q' of instance of `%k': %k has not been bound", + key, Dee_TYPE(self), self); +} + +INTERN ATTR_COLD NONNULL((1, 2)) int +(DCALL err_unbound_key_str_len)(DeeObject *self, char const *key, size_t keylen) { + ASSERT_OBJECT(self); + return DeeError_Throwf(&DeeError_UnboundItem, + "Key `%$q' of instance of `%k': %k has not been bound", + keylen, key, Dee_TYPE(self), self); +} + INTERN ATTR_COLD NONNULL((1, 2)) int (DCALL err_readonly_key)(DeeObject *self, DeeObject *key) { ASSERT_OBJECT(self); diff --git a/src/deemon/runtime/runtime_error.h b/src/deemon/runtime/runtime_error.h index 8ea2a2478..2672f4ff2 100644 --- a/src/deemon/runtime/runtime_error.h +++ b/src/deemon/runtime/runtime_error.h @@ -56,6 +56,8 @@ INTDEF ATTR_COLD int DCALL err_va_index_out_of_bounds(size_t index, size_t size) INTDEF ATTR_COLD NONNULL((1)) int DCALL err_unbound_index(DeeObject *__restrict self, size_t index); INTDEF ATTR_COLD NONNULL((1, 2)) int DCALL err_unbound_index_ob(DeeObject *self, DeeObject *indexob); INTDEF ATTR_COLD NONNULL((1, 2)) int DCALL err_unbound_key(DeeObject *self, DeeObject *key); +INTDEF ATTR_COLD NONNULL((1, 2)) int DCALL err_unbound_key_str(DeeObject *self, char const *key); +INTDEF ATTR_COLD NONNULL((1, 2)) int DCALL err_unbound_key_str_len(DeeObject *self, char const *key, size_t keylen); INTDEF ATTR_COLD NONNULL((1, 2)) int DCALL err_readonly_key(DeeObject *self, DeeObject *key); INTDEF ATTR_COLD NONNULL((1)) int DCALL err_expected_single_character_string(DeeObject *__restrict str); INTDEF ATTR_COLD NONNULL((1)) int DCALL err_integer_overflow(DeeObject *__restrict overflowing_object, size_t cutoff_bits, bool positive_overflow); @@ -176,6 +178,8 @@ INTDEF ATTR_COLD NONNULL((1)) int DCALL err_file_not_found(DeeObject *__restrict #define err_unbound_index(self, index) Dee_ASSUMED_VALUE(err_unbound_index(self, index), -1) #define err_unbound_index_ob(self, indexob) Dee_ASSUMED_VALUE(err_unbound_index_ob(self, indexob), -1) #define err_unbound_key(self, key) Dee_ASSUMED_VALUE(err_unbound_key(self, key), -1) +#define err_unbound_key_str(self, key) Dee_ASSUMED_VALUE(err_unbound_key_str(self, key), -1) +#define err_unbound_key_str_len(self, key, keylen) Dee_ASSUMED_VALUE(err_unbound_key_str_len(self, key, keylen), -1) #define err_readonly_key(self, key) Dee_ASSUMED_VALUE(err_readonly_key(self, key), -1) #define err_expected_single_character_string(str) Dee_ASSUMED_VALUE(err_expected_single_character_string(str), -1) #define err_integer_overflow(overflowing_object, cutoff_bits, positive_overflow) Dee_ASSUMED_VALUE(err_integer_overflow(overflowing_object, cutoff_bits, positive_overflow), -1) diff --git a/src/dex/collections/bitset.c b/src/dex/collections/bitset.c index a2ed68835..9a01eb91f 100644 --- a/src/dex/collections/bitset.c +++ b/src/dex/collections/bitset.c @@ -1647,6 +1647,8 @@ PRIVATE struct type_seq bs_seq = { /* .tp_nsi = */ &bs_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&bs_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&bs_size, @@ -2286,6 +2288,8 @@ PRIVATE struct type_seq robs_seq = { /* .tp_nsi = */ &robs_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&robs_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&robs_size, @@ -3978,6 +3982,8 @@ PRIVATE struct type_seq bsv_seq = { /* .tp_nsi = */ &bsv_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&bsv_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&bsv_size, diff --git a/src/dex/collections/deque.c b/src/dex/collections/deque.c index 8321ce3ca..f5d1096d6 100644 --- a/src/dex/collections/deque.c +++ b/src/dex/collections/deque.c @@ -1198,6 +1198,8 @@ PRIVATE struct type_seq deq_seq = { /* .tp_nsi = */ &deq_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&deq_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&deq_size, diff --git a/src/dex/collections/fixedlist.c b/src/dex/collections/fixedlist.c index c8751b119..464bac0a0 100644 --- a/src/dex/collections/fixedlist.c +++ b/src/dex/collections/fixedlist.c @@ -1137,6 +1137,8 @@ PRIVATE struct type_seq fl_seq = { /* .tp_nsi = */ &fl_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&fl_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&fl_size, diff --git a/src/dex/collections/udict.c b/src/dex/collections/udict.c index e4aa1bbf0..f0bbea746 100644 --- a/src/dex/collections/udict.c +++ b/src/dex/collections/udict.c @@ -1509,6 +1509,8 @@ PRIVATE struct type_seq udict_seq = { /* .tp_nsi = */ &udict_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&udict_foreach, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&udict_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&udict_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&udict_size, @@ -2227,6 +2229,8 @@ PRIVATE struct type_seq urodict_seq = { /* .tp_nsi = */ &urodict_nsi, /* .tp_foreach = */ NULL, /* .tp_foreach_pair = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_pair_t, void *))&urodict_foreach, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ (int (DCALL *)(DeeObject *, DeeObject *))&urodict_bounditem, /* .tp_hasitem = */ (int (DCALL *)(DeeObject *, DeeObject *))&urodict_hasitem, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&urodict_size, diff --git a/src/dex/collections/uset.c b/src/dex/collections/uset.c index ecb0ee3f6..8c0b8adc6 100644 --- a/src/dex/collections/uset.c +++ b/src/dex/collections/uset.c @@ -1249,6 +1249,8 @@ PRIVATE struct type_seq uset_seq = { /* .tp_nsi = */ &uset_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&uset_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&uset_size, @@ -1646,6 +1648,8 @@ PRIVATE struct type_seq uroset_seq = { /* .tp_nsi = */ &uroset_nsi, /* .tp_foreach = */ (Dee_ssize_t (DCALL *)(DeeObject *__restrict, Dee_foreach_t, void *))&uroset_foreach, /* .tp_foreach_pair = */ NULL, + /* .tp_enumerate = */ NULL, + /* .tp_enumerate_index = */ NULL, /* .tp_bounditem = */ NULL, /* .tp_hasitem = */ NULL, /* .tp_size = */ (size_t (DCALL *)(DeeObject *__restrict))&uroset_size,