Skip to content

Commit

Permalink
Make DeeObject_Unpack() virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
GrieferAtWork committed Oct 5, 2024
1 parent 78ebe88 commit d492634
Show file tree
Hide file tree
Showing 26 changed files with 952 additions and 244 deletions.
1 change: 1 addition & 0 deletions .vs/deemon-v141.sln
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2360741E-F
..\util\test\compiler-varying-functions.dee = ..\util\test\compiler-varying-functions.dee
..\util\test\ctypes-from-bytes.dee = ..\util\test\ctypes-from-bytes.dee
..\util\test\ctypes-futex.dee = ..\util\test\ctypes-futex.dee
..\util\test\ctypes-struct.dee = ..\util\test\ctypes-struct.dee
..\util\test\ctypes.dee = ..\util\test\ctypes.dee
..\util\test\deemon-class-inheritance.dee = ..\util\test\deemon-class-inheritance.dee
..\util\test\deemon-dict-frozen.dee = ..\util\test\deemon-dict-frozen.dee
Expand Down
1 change: 1 addition & 0 deletions .vs/deemon-v142.sln
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2360741E-F
..\util\test\compiler-varying-functions.dee = ..\util\test\compiler-varying-functions.dee
..\util\test\ctypes-from-bytes.dee = ..\util\test\ctypes-from-bytes.dee
..\util\test\ctypes-futex.dee = ..\util\test\ctypes-futex.dee
..\util\test\ctypes-struct.dee = ..\util\test\ctypes-struct.dee
..\util\test\ctypes.dee = ..\util\test\ctypes.dee
..\util\test\deemon-class-inheritance.dee = ..\util\test\deemon-class-inheritance.dee
..\util\test\deemon-dict-frozen.dee = ..\util\test\deemon-dict-frozen.dee
Expand Down
139 changes: 139 additions & 0 deletions include/deemon/class.h

Large diffs are not rendered by default.

82 changes: 58 additions & 24 deletions include/deemon/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -2131,38 +2131,39 @@ struct Dee_type_seq {
* but will not contain any object references. You must resize it until it is able
* to hold at least "return" elements, and call this operator again.
* @return: (size_t)-1: Error. */
WUNUSED_T NONNULL_T((1)) size_t (DCALL *tp_asvector)(DeeObject *self, /*out*/ DREF DeeObject **dst, size_t dst_length);
WUNUSED_T NONNULL_T((1)) size_t (DCALL *tp_asvector)(DeeObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst);

/* NOTE: `DeeObject_Unpack()' follow `DeeObject_Foreach()' semantics (unbound elements are skipped) */
/* NOTE: `DeeObject_UnpackWithUnbound()' follow `DeeObject_Enumerate()' semantics (unbound elements are included) */

/* TODO: tp_unpack (Operator for `DeeObject_Unpack()') */
/* TODO: tp_unpack_ub (Operator for `DeeObject_UnpackWithUnbound()') */
/* TODO: For tp_unpack, default impls using:
/* >> tp_unpack
* Operator for `DeeObject_Unpack()', following
* `DeeObject_Foreach()' semantics (unbound elements are skipped)
* Default impls use:
* - tp_asvector
* - tp_size + tp_getitem_index_fast
* - tp_size + tp_getitem_index
* - tp_size + tp_trygetitem_index
* - tp_sizeob + tp_getitem
* - tp_size + tp_getitem_index
* - tp_sizeob + tp_trygetitem
* - tp_enumerate_index
* - tp_enumerate
* - tp_sizeob + tp_getitem
* - tp_foreach
* - tp_iter
*/

/* TODO: For tp_unpack_ub, default impls using:
* - tp_unpack (direct alias if not a default impl)
* - tp_asvector
* - tp_foreach (default impl) */
WUNUSED_T NONNULL_T((1)) int (DCALL *tp_unpack)(DeeObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst);

/* >> tp_unpack_ub
* Operator for `DeeObject_UnpackWithUnbound()', following
* `DeeObject_Enumerate()' semantics (unbound elements are included)
* Default impls use:
* - tp_unpack
* - tp_size + tp_getitem_index_fast
* - tp_size + tp_trygetitem_index
* - tp_size + tp_getitem_index
* - tp_sizeob + tp_trygetitem
* - tp_sizeob + tp_getitem
* - tp_enumerate_index
* - tp_enumerate
* - tp_unpack (direct alias, even if a default impl)
*/
* - tp_size/tp_sizeob + tp_enumerate_index
* - tp_size/tp_sizeob + tp_enumerate
* - tp_asvector
* - tp_foreach
* - tp_iter */
WUNUSED_T NONNULL_T((1)) int (DCALL *tp_unpack_ub)(DeeObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst);

/* All of the following are *always* and *unconditionally* implemented
* when the associated type has the "tp_features & TF_KW" flag set,
Expand Down Expand Up @@ -2542,13 +2543,29 @@ myob_hasitem_string_len_hash(MyObject *self, char const *key, size_t keylen, Dee
}

PRIVATE WUNUSED NONNULL((1)) size_t DCALL
myob_asvector(MyObject *self, /*out*/ DREF DeeObject **dst, size_t dst_length) {
myob_asvector(MyObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst) {
(void)self;
(void)dst;
(void)dst_length;
return (size_t)DeeError_NOTIMPLEMENTED();
}

PRIVATE WUNUSED NONNULL((1)) int DCALL
myob_unpack(MyObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst) {
(void)self;
(void)dst;
(void)dst_length;
return DeeError_NOTIMPLEMENTED();
}

PRIVATE WUNUSED NONNULL((1)) int DCALL
myob_unpack_ub(MyObject *self, size_t dst_length, /*out*/ DREF DeeObject **dst) {
(void)self;
(void)dst;
(void)dst_length;
return DeeError_NOTIMPLEMENTED();
}

PRIVATE struct type_seq myob_seq = {
/* .tp_iter = */ (DREF DeeObject *(DCALL *)(DeeObject *__restrict))&myob_iter,
/* .tp_sizeob = */ (DREF DeeObject *(DCALL *)(DeeObject *__restrict))&myob_sizeob,
Expand Down Expand Up @@ -2595,7 +2612,9 @@ PRIVATE struct type_seq myob_seq = {
/* .tp_setitem_string_len_hash = */ (int (DCALL *)(DeeObject *, char const *, size_t, Dee_hash_t, DeeObject *))&myob_setitem_string_len_hash,
/* .tp_bounditem_string_len_hash = */ (int (DCALL *)(DeeObject *, char const *, size_t, Dee_hash_t))&myob_bounditem_string_len_hash,
/* .tp_hasitem_string_len_hash = */ (int (DCALL *)(DeeObject *, char const *, size_t, Dee_hash_t))&myob_hasitem_string_len_hash,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, DREF DeeObject **, size_t))&myob_asvector,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, size_t, DREF DeeObject **))&myob_asvector,
/* .tp_unpack = */ (int (DCALL *)(DeeObject *, size_t, DREF DeeObject **))&myob_unpack,
/* .tp_unpack_ub = */ (int (DCALL *)(DeeObject *, size_t, DREF DeeObject **))&myob_unpack_ub,
/* .tp_getitemnr = */ (DeeObject *(DCALL *)(DeeObject *__restrict, /*string*/ DeeObject *__restrict))NULL,
/* .tp_getitemnr_string_hash = */ (DeeObject *(DCALL *)(DeeObject *__restrict, char const *__restrict, Dee_hash_t))NULL,
/* .tp_getitemnr_string_len_hash = */ (DeeObject *(DCALL *)(DeeObject *__restrict, char const *__restrict, size_t, Dee_hash_t))NULL,
Expand Down Expand Up @@ -4182,7 +4201,7 @@ INTDEF NONNULL((1)) bool DCALL DeeType_InheritXor(DeeTypeObject *__restrict self
INTDEF NONNULL((1)) bool DCALL DeeType_InheritPow(DeeTypeObject *__restrict self); /* tp_pow, tp_inplace_pow */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritCompare(DeeTypeObject *__restrict self); /* tp_hash, tp_eq, tp_ne, tp_lo, tp_le, tp_gr, tp_ge, tp_compare_eq, tp_compare */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritIterNext(DeeTypeObject *__restrict self); /* tp_iter_next, tp_iter */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritIter(DeeTypeObject *__restrict self); /* tp_iter, tp_foreach, tp_foreach_pair */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritIter(DeeTypeObject *__restrict self); /* tp_iter, tp_foreach, tp_foreach_pair, tp_unpack, tp_unpack_ub */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritSize(DeeTypeObject *__restrict self); /* tp_sizeob, tp_size */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritContains(DeeTypeObject *__restrict self); /* tp_contains */
INTDEF NONNULL((1)) bool DCALL DeeType_InheritGetItem(DeeTypeObject *__restrict self); /* tp_getitem, tp_getitem_index, tp_bounditem, tp_bounditem_index, tp_hasitem, tp_hasitem_index, tp_getitem_index_fast, tp_trygetitem, tp_trygetitem_string_hash, tp_getitem_string_hash, tp_bounditem_string_hash, tp_hasitem_string_hash, tp_trygetitem_string_len_hash, tp_getitem_string_len_hash, tp_bounditem_string_len_hash, tp_hasitem_string_len_hash */
Expand Down Expand Up @@ -5057,11 +5076,25 @@ DFUNDEF WUNUSED NONNULL((1, 2)) Dee_ssize_t
void *arg, size_t start, size_t end);


/* Unpack the given sequence `self' into `objc' items then stored within the `objv' vector. */
/* Unpack the given sequence `self' into `objc' items then stored within the `objv' vector.
* This operator follows `DeeObject_Foreach()' semantics, in that unbound items are skipped.
* @return: 0 : Success (`objv' now contains exactly `objc' references to [1..1] objects)
* @return: -1: An error was thrown (`objv' may have been modified, but contains no references) */
DFUNDEF WUNUSED ATTR_OUTS(3, 2) NONNULL((1)) int
(DCALL DeeObject_Unpack)(DeeObject *__restrict self, size_t objc,
/*out*/ DREF DeeObject **__restrict objv);

/* Similar to `DeeObject_Unpack()', but does not skip unbound items. Instead,
* unbound items will appear as `NULL' in `objv' upon success (meaning you have
* to use `Dee_XDecrefv()' to drop references).
* This operator follows `DeeObject_Enumerate()' semantics, in that unbound items
* are NOT skipped.
* @return: 0 : Success (`objv' now contains exactly `objc' references to [0..1] objects)
* @return: -1: An error was thrown (`objv' may have been modified, but contains no references) */
DFUNDEF WUNUSED ATTR_OUTS(3, 2) NONNULL((1)) int
(DCALL DeeObject_UnpackWithUnbound)(DeeObject *__restrict self, size_t objc,
/*out*/ DREF DeeObject **__restrict objv);

/* >> DeeObject_GetAttr() -- <self>.<attr>;
* Retrieve a named attribute of an object
* @return: * : The value of the attribute `attr'
Expand Down Expand Up @@ -5271,6 +5304,7 @@ DFUNDEF NONNULL((1, 2)) void (DCALL DeeObject_PutBuf)(DeeObject *__restrict self
#define DeeObject_SetRangeEndIndex(self, begin, end, value) __builtin_expect(DeeObject_SetRangeEndIndex(self, begin, end, value), 0)
#define DeeObject_SetRangeIndex(self, begin, end, value) __builtin_expect(DeeObject_SetRangeIndex(self, begin, end, value), 0)
#define DeeObject_Unpack(self, objc, objv) __builtin_expect(DeeObject_Unpack(self, objc, objv), 0)
#define DeeObject_UnpackWithUnbound(self, objc, objv) __builtin_expect(DeeObject_UnpackWithUnbound(self, objc, objv), 0)
#define DeeObject_DelAttr(self, attr) __builtin_expect(DeeObject_DelAttr(self, attr), 0)
#define DeeObject_SetAttr(self, attr, value) __builtin_expect(DeeObject_SetAttr(self, attr, value), 0)
#ifndef DeeObject_DelAttrString
Expand Down
22 changes: 0 additions & 22 deletions include/deemon/seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -820,28 +820,6 @@ DeeSeq_AsHeapVectorWithAllocReuseOffset2(DeeObject *__restrict self,
/*in*/ size_t offset);
#endif /* Dee_MallocUsableSize */

/* Same as `DeeObject_Unpack()', but handle `DeeError_UnboundItem'
* by filling in the resp. element from `objv[*]' with `NULL'.
* This function is implemented to try the following things with `self' (in order):
* - Use `DeeFastSeq_GetSize_deprecated()' + `DeeFastSeq_GetItemUnbound_deprecated()'
* Try next when `DeeFastSeq_GetSize_deprecated() == DEE_FASTSEQ_NOTFAST_DEPRECATED'
* - Use `DeeObject_Size()' + `DeeObject_GetItemIndex()'
* Try next when `DeeObject_Size()' throws `DeeError_NotImplemented', or
* `DeeObject_GetItemIndex()' (first call only) throws `DeeError_NotImplemented'
* or `DeeError_TypeError'.
* - Use `DeeObject_Unpack()' (meaning that all elements written to `objv' will be non-NULL)
* @return: 0 : Success
* @return: -1: Error */
DFUNDEF WUNUSED ATTR_OUTS(3, 2) NONNULL((1)) int
(DCALL DeeObject_UnpackWithUnbound)(DeeObject *__restrict self, size_t objc,
/*out*/ DREF DeeObject **__restrict objv);

#ifndef __INTELLISENSE__
#ifndef __NO_builtin_expect
#define DeeObject_UnpackWithUnbound(self, objc, objv) __builtin_expect(DeeObject_UnpackWithUnbound(self, objc, objv), 0)
#endif /* !__NO_builtin_expect */
#endif /* !__INTELLISENSE__ */

DECL_END

#endif /* !GUARD_DEEMON_SEQ_H */
3 changes: 2 additions & 1 deletion include/deemon/super.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ DFUNDEF WUNUSED NONNULL((1, 2, 4, 5)) int (DCALL DeeObject_TSetRangeBeginIndex)(
DFUNDEF WUNUSED NONNULL((1, 2, 3, 5)) int (DCALL DeeObject_TSetRangeEndIndex)(DeeTypeObject *tp_self, DeeObject *self, DeeObject *begin, Dee_ssize_t end, DeeObject *values);
DFUNDEF WUNUSED NONNULL((1, 2, 5)) int (DCALL DeeObject_TSetRangeIndex)(DeeTypeObject *tp_self, DeeObject *self, Dee_ssize_t begin, Dee_ssize_t end, DeeObject *values);
DFUNDEF WUNUSED NONNULL((1, 2, 4)) int (DCALL DeeObject_TSetRangeIndexN)(DeeTypeObject *tp_self, DeeObject *self, Dee_ssize_t begin, DeeObject *values);

DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_TBoundItem)(DeeTypeObject *tp_self, DeeObject *self, DeeObject *index);
DFUNDEF WUNUSED NONNULL((1, 2)) int (DCALL DeeObject_TBoundItemIndex)(DeeTypeObject *tp_self, DeeObject *self, size_t index);
DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_TBoundItemStringHash)(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash);
Expand All @@ -203,6 +202,8 @@ DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_THasItem)(DeeTypeObject
DFUNDEF WUNUSED NONNULL((1, 2)) int (DCALL DeeObject_THasItemIndex)(DeeTypeObject *tp_self, DeeObject *self, size_t index);
DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_THasItemStringHash)(DeeTypeObject *tp_self, DeeObject *self, char const *key, Dee_hash_t hash);
DFUNDEF WUNUSED NONNULL((1, 2, 3)) int (DCALL DeeObject_THasItemStringLenHash)(DeeTypeObject *tp_self, DeeObject *self, char const *key, size_t keylen, Dee_hash_t hash);
DFUNDEF WUNUSED ATTR_OUTS(4, 3) NONNULL((1, 2)) int (DCALL DeeObject_TUnpack)(DeeTypeObject *tp_self, DeeObject *self, size_t objc, /*out*/ DREF DeeObject **__restrict objv);
DFUNDEF WUNUSED ATTR_OUTS(4, 3) NONNULL((1, 2)) int (DCALL DeeObject_TUnpackWithUnbound)(DeeTypeObject *tp_self, DeeObject *self, size_t objc, /*out*/ DREF DeeObject **__restrict objv);

/* Attribute operators */
DFUNDEF WUNUSED NONNULL((1, 2, 3)) DREF DeeObject *(DCALL DeeObject_TGetAttr)(DeeTypeObject *tp_self, DeeObject *self, /*String*/ DeeObject *attr);
Expand Down
11 changes: 11 additions & 0 deletions src/deemon/linker-scripts/link-deemon-gcc-i386-cygwin.def
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@ EXPORTS
_DeeObject_IterAdvance@8=DeeObject_IterAdvance@8
_DeeObject_IterKeys@4=DeeObject_IterKeys@4
_DeeObject_IterNext@4=DeeObject_IterNext@4
_DeeObject_IterNextKey@4=DeeObject_IterNextKey@4
_DeeObject_IterNextPair@8=DeeObject_IterNextPair@8
_DeeObject_IterNextValue@4=DeeObject_IterNextValue@4
_DeeObject_Leave@4=DeeObject_Leave@4
_DeeObject_Mod@8=DeeObject_Mod@8
_DeeObject_ModInt8@8=DeeObject_ModInt8@8
Expand Down Expand Up @@ -898,8 +901,12 @@ EXPORTS
_DeeObject_TInv@8=DeeObject_TInv@8
_DeeObject_TInvokeOperator@20=DeeObject_TInvokeOperator@20
_DeeObject_TIter@8=DeeObject_TIter@8
_DeeObject_TIterAdvance@12=DeeObject_TIterAdvance@12
_DeeObject_TIterKeys@8=DeeObject_TIterKeys@8
_DeeObject_TIterNext@8=DeeObject_TIterNext@8
_DeeObject_TIterNextKey@8=DeeObject_TIterNextKey@8
_DeeObject_TIterNextPair@12=DeeObject_TIterNextPair@12
_DeeObject_TIterNextValue@8=DeeObject_TIterNextValue@8
_DeeObject_TLeave@8=DeeObject_TLeave@8
_DeeObject_TMod@12=DeeObject_TMod@12
_DeeObject_TMoveAssign@12=DeeObject_TMoveAssign@12
Expand Down Expand Up @@ -938,6 +945,8 @@ EXPORTS
_DeeObject_TTryGetItemIndex@12=DeeObject_TTryGetItemIndex@12
_DeeObject_TTryGetItemStringHash@16=DeeObject_TTryGetItemStringHash@16
_DeeObject_TTryGetItemStringLenHash@20=DeeObject_TTryGetItemStringLenHash@20
_DeeObject_TUnpack@16=DeeObject_TUnpack@16
_DeeObject_TUnpackWithUnbound@16=DeeObject_TUnpackWithUnbound@16
_DeeObject_TVCallAttrStringHashf@24=DeeObject_TVCallAttrStringHashf@24
_DeeObject_TVCallAttrf@20=DeeObject_TVCallAttrf@20
_DeeObject_TVisit@16=DeeObject_TVisit@16
Expand Down Expand Up @@ -1355,6 +1364,8 @@ EXPORTS
_Dee_weakref_support_fini@4=Dee_weakref_support_fini@4
__DeeAssert_Fail@12=_DeeAssert_Fail@12
__DeeAssert_XFail@12=_DeeAssert_XFail@12
__Dee_MalloccBufsizeDbg@16=_Dee_MalloccBufsizeDbg@16
__Dee_MallococBufsizeDbg@20=_Dee_MallococBufsizeDbg@20
__Dee_dprint@4=_Dee_dprint@4
__Dee_dprinter@12=_Dee_dprinter@12
__Dee_vdprintf@8=_Dee_vdprintf@8
11 changes: 11 additions & 0 deletions src/deemon/linker-scripts/link-deemon-msvc-i386-win32.def
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@ EXPORTS
DeeObject_IterAdvance@8=_DeeObject_IterAdvance@8
DeeObject_IterKeys@4=_DeeObject_IterKeys@4
DeeObject_IterNext@4=_DeeObject_IterNext@4
DeeObject_IterNextKey@4=_DeeObject_IterNextKey@4
DeeObject_IterNextPair@8=_DeeObject_IterNextPair@8
DeeObject_IterNextValue@4=_DeeObject_IterNextValue@4
DeeObject_Leave@4=_DeeObject_Leave@4
DeeObject_Mod@8=_DeeObject_Mod@8
DeeObject_ModInt8@8=_DeeObject_ModInt8@8
Expand Down Expand Up @@ -898,8 +901,12 @@ EXPORTS
DeeObject_TInv@8=_DeeObject_TInv@8
DeeObject_TInvokeOperator@20=_DeeObject_TInvokeOperator@20
DeeObject_TIter@8=_DeeObject_TIter@8
DeeObject_TIterAdvance@12=_DeeObject_TIterAdvance@12
DeeObject_TIterKeys@8=_DeeObject_TIterKeys@8
DeeObject_TIterNext@8=_DeeObject_TIterNext@8
DeeObject_TIterNextKey@8=_DeeObject_TIterNextKey@8
DeeObject_TIterNextPair@12=_DeeObject_TIterNextPair@12
DeeObject_TIterNextValue@8=_DeeObject_TIterNextValue@8
DeeObject_TLeave@8=_DeeObject_TLeave@8
DeeObject_TMod@12=_DeeObject_TMod@12
DeeObject_TMoveAssign@12=_DeeObject_TMoveAssign@12
Expand Down Expand Up @@ -938,6 +945,8 @@ EXPORTS
DeeObject_TTryGetItemIndex@12=_DeeObject_TTryGetItemIndex@12
DeeObject_TTryGetItemStringHash@16=_DeeObject_TTryGetItemStringHash@16
DeeObject_TTryGetItemStringLenHash@20=_DeeObject_TTryGetItemStringLenHash@20
DeeObject_TUnpack@16=_DeeObject_TUnpack@16
DeeObject_TUnpackWithUnbound@16=_DeeObject_TUnpackWithUnbound@16
DeeObject_TVCallAttrStringHashf@24=_DeeObject_TVCallAttrStringHashf@24
DeeObject_TVCallAttrf@20=_DeeObject_TVCallAttrf@20
DeeObject_TVisit@16=_DeeObject_TVisit@16
Expand Down Expand Up @@ -1355,6 +1364,8 @@ EXPORTS
Dee_weakref_support_fini@4=_Dee_weakref_support_fini@4
_DeeAssert_Fail@12=__DeeAssert_Fail@12
_DeeAssert_XFail@12=__DeeAssert_XFail@12
_Dee_MalloccBufsizeDbg@16=__Dee_MalloccBufsizeDbg@16
_Dee_MallococBufsizeDbg@20=__Dee_MallococBufsizeDbg@20
_Dee_dprint@4=__Dee_dprint@4
_Dee_dprinter@12=__Dee_dprinter@12
_Dee_vdprintf@8=__Dee_vdprintf@8
4 changes: 2 additions & 2 deletions src/deemon/objects/bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ bytes_foreach(Bytes *__restrict self, Dee_foreach_t proc, void *arg) {
}

PRIVATE WUNUSED NONNULL((1)) size_t DCALL
bytes_asvector(Bytes *self, /*out*/ DREF DeeObject **dst, size_t dst_length) {
bytes_asvector(Bytes *self, size_t dst_length, /*out*/ DREF DeeObject **dst) {
size_t size = DeeBytes_SIZE(self);
if likely(dst_length >= size) {
size_t i;
Expand Down Expand Up @@ -1502,7 +1502,7 @@ PRIVATE struct type_seq bytes_seq = {
/* .tp_setitem_string_len_hash = */ NULL,
/* .tp_bounditem_string_len_hash = */ NULL,
/* .tp_hasitem_string_len_hash = */ NULL,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, DREF DeeObject **, size_t))&bytes_asvector,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, size_t, DREF DeeObject **))&bytes_asvector,
};


Expand Down
2 changes: 2 additions & 0 deletions src/deemon/objects/cached-dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,8 @@ PRIVATE struct type_seq cdict_seq = {
/* .tp_bounditem_string_len_hash = */ (int (DCALL *)(DeeObject *, char const *, size_t, Dee_hash_t))&cdict_bounditem_string_len_hash,
/* .tp_hasitem_string_len_hash = */ NULL,
/* .tp_asvector = */ NULL,
/* .tp_unpack = */ NULL,
/* .tp_unpack_ub = */ NULL,
/* .tp_getitemnr = */ (DeeObject *(DCALL *)(DeeObject *__restrict, /*string*/ DeeObject *__restrict))&cdict_getitemnr,
/* .tp_getitemnr_string_hash = */ (DeeObject *(DCALL *)(DeeObject *__restrict, char const *__restrict, Dee_hash_t))&cdict_getitemnr_string_hash,
/* .tp_getitemnr_string_len_hash = */ (DeeObject *(DCALL *)(DeeObject *__restrict, char const *__restrict, size_t, Dee_hash_t))&cdict_getitemnr_string_len_hash,
Expand Down
4 changes: 2 additions & 2 deletions src/deemon/objects/hashset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ hashset_printrepr(HashSet *__restrict self,
}

PRIVATE WUNUSED NONNULL((1)) size_t DCALL
hashset_asvector(HashSet *self, /*out*/ DREF DeeObject **dst, size_t dst_length) {
hashset_asvector(HashSet *self, size_t dst_length, /*out*/ DREF DeeObject **dst) {
size_t result;
DeeHashSet_LockRead(self);
result = self->hs_used;
Expand Down Expand Up @@ -1926,7 +1926,7 @@ PRIVATE struct type_seq hashset_seq = {
/* .tp_setitem_string_len_hash = */ NULL,
/* .tp_bounditem_string_len_hash = */ NULL,
/* .tp_hasitem_string_len_hash = */ NULL,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, DREF DeeObject **, size_t))&hashset_asvector,
/* .tp_asvector = */ (size_t (DCALL *)(DeeObject *, size_t, DREF DeeObject **))&hashset_asvector,
};

PRIVATE WUNUSED NONNULL((1)) int DCALL
Expand Down
Loading

0 comments on commit d492634

Please sign in to comment.