Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
junkmd committed Sep 23, 2024
1 parent a253e83 commit 7414398
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions comtypes/safearray.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ def _make_safearray_type(itemtype):
)

meta = type(_safearray.tagSAFEARRAY)
sa_type = meta.__new__(
meta, "SAFEARRAY_%s" % itemtype.__name__, (_safearray.tagSAFEARRAY,), {}
sa_type = type.__new__(
meta,
f"SAFEARRAY_{itemtype.__name__}",
(_safearray.tagSAFEARRAY,),
{"_type_": meta},
)

try:
Expand Down Expand Up @@ -114,6 +117,7 @@ class _(object):
_itemtype_ = itemtype # a ctypes type
_vartype_ = vartype # a VARTYPE value: VT_...
_needsfree = False
_type_ = sa_type # a ctypes type

@classmethod
def create(cls, value, extra=extra):
Expand Down

0 comments on commit 7414398

Please sign in to comment.