We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ITypeComp.Bind
1 parent ce14575 commit 267e13dCopy full SHA for 267e13d
1 file changed
comtypes/typeinfo.py
@@ -445,16 +445,10 @@ def Bind(
445
)
446
kind = desckind.value
447
if kind == DESCKIND_FUNCDESC:
448
- fd = bindptr.lpfuncdesc[0]
449
- fd.__ref__ = weakref.ref(
450
- fd, lambda dead: ti.ReleaseFuncDesc(bindptr.lpfuncdesc)
451
- )
+ fd = _deref_with_release(bindptr.lpfuncdesc, ti.ReleaseFuncDesc)
452
return "function", fd
453
elif kind == DESCKIND_VARDESC:
454
- vd = bindptr.lpvardesc[0]
455
- vd.__ref__ = weakref.ref(
456
- vd, lambda dead: ti.ReleaseVarDesc(bindptr.lpvardesc)
457
+ vd = _deref_with_release(bindptr.lpvardesc, ti.ReleaseVarDesc)
458
return "variable", vd
459
elif kind == DESCKIND_TYPECOMP:
460
return "type", bindptr.lptcomp
0 commit comments