summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2019-04-26 06:56:15 (GMT)
committerGitHub <noreply@github.com>2019-04-26 06:56:15 (GMT)
commit7abb6c05afd02c17c7a941b64db5756b161b3cf7 (patch)
treee8fd0e63830dd923246db8aa57bed76b526c915f /Objects
parent3cde440f20a9db75fb2c4e65e8e4d04a53216a2d (diff)
downloadcpython-7abb6c05afd02c17c7a941b64db5756b161b3cf7.zip
cpython-7abb6c05afd02c17c7a941b64db5756b161b3cf7.tar.gz
cpython-7abb6c05afd02c17c7a941b64db5756b161b3cf7.tar.bz2
bpo-36669: add matmul support to weakref.proxy (GH-12932)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/weakrefobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 9227aa6..ff6d922 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -525,6 +525,8 @@ WRAP_BINARY(proxy_iand, PyNumber_InPlaceAnd)
WRAP_BINARY(proxy_ixor, PyNumber_InPlaceXor)
WRAP_BINARY(proxy_ior, PyNumber_InPlaceOr)
WRAP_UNARY(proxy_index, PyNumber_Index)
+WRAP_BINARY(proxy_matmul, PyNumber_MatrixMultiply)
+WRAP_BINARY(proxy_imatmul, PyNumber_InPlaceMatrixMultiply)
static int
proxy_bool(PyWeakReference *proxy)
@@ -642,6 +644,8 @@ static PyNumberMethods proxy_as_number = {
proxy_ifloor_div, /*nb_inplace_floor_divide*/
proxy_itrue_div, /*nb_inplace_true_divide*/
proxy_index, /*nb_index*/
+ proxy_matmul, /*nb_matrix_multiply*/
+ proxy_imatmul, /*nb_inplace_matrix_multiply*/
};
static PySequenceMethods proxy_as_sequence = {