8000 Check for callable proxy · python/cpython@334c766 · GitHub
[go: up one dir, main page]

Skip to content

Commit 334c766

Browse files
committed
Check for callable proxy
1 parent 8982831 commit 334c766

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Objects/weakrefobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ try_reuse_basic_ref(PyWeakReference *ref, PyWeakReference *proxy,
441441
if (type == &_PyWeakref_RefType) {
442442
cand = ref;
443443
}
444-
if (type == &_PyWeakref_ProxyType) {
444+
if ((type == &_PyWeakref_ProxyType) ||
445+
(type == &_PyWeakref_CallableProxyType)) {
445446
cand = proxy;
446447
}
447448

0 commit comments

Comments
 (0)
0