diff options
author | Dong-hee Na <donghee.na@python.org> | 2021-11-26 14:10:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 14:10:10 (GMT) |
commit | db671b010cb4662011c6e6567a1f4fcd509102b8 (patch) | |
tree | 2f94b6a7974ab2c4b585cff74c3479565a391deb /Objects/abstract.c | |
parent | d224e769b83a6a027bec8e21ee62db2b96d5af8e (diff) | |
download | cpython-db671b010cb4662011c6e6567a1f4fcd509102b8.zip cpython-db671b010cb4662011c6e6567a1f4fcd509102b8.tar.gz cpython-db671b010cb4662011c6e6567a1f4fcd509102b8.tar.bz2 |
bpo-45760: Remove PyNumber_InMatrixMultiply (GH-29751)
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 82599dd..5c533bf 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1248,21 +1248,10 @@ INPLACE_BINOP(PyNumber_InPlaceAnd, nb_inplace_and, nb_and, "&=") INPLACE_BINOP(PyNumber_InPlaceLshift, nb_inplace_lshift, nb_lshift, "<<=") INPLACE_BINOP(PyNumber_InPlaceRshift, nb_inplace_rshift, nb_rshift, ">>=") INPLACE_BINOP(PyNumber_InPlaceSubtract, nb_inplace_subtract, nb_subtract, "-=") -INPLACE_BINOP(PyNumber_InMatrixMultiply, nb_inplace_matrix_multiply, nb_matrix_multiply, "@=") - -PyObject * -PyNumber_InPlaceFloorDivide(PyObject *v, PyObject *w) -{ - return binary_iop(v, w, NB_SLOT(nb_inplace_floor_divide), - NB_SLOT(nb_floor_divide), "//="); -} - -PyObject * -PyNumber_InPlaceTrueDivide(PyObject *v, PyObject *w) -{ - return binary_iop(v, w, NB_SLOT(nb_inplace_true_divide), - NB_SLOT(nb_true_divide), "/="); -} +INPLACE_BINOP(PyNumber_InPlaceMatrixMultiply, nb_inplace_matrix_multiply, nb_matrix_multiply, "@=") +INPLACE_BINOP(PyNumber_InPlaceFloorDivide, nb_inplace_floor_divide, nb_floor_divide, "//=") +INPLACE_BINOP(PyNumber_InPlaceTrueDivide, nb_inplace_true_divide, nb_true_divide, "/=") +INPLACE_BINOP(PyNumber_InPlaceRemainder, nb_inplace_remainder, nb_remainder, "%=") PyObject * PyNumber_InPlaceAdd(PyObject *v, PyObject *w) @@ -1317,20 +1306,6 @@ PyNumber_InPlaceMultiply(PyObject *v, PyObject *w) } PyObject * -PyNumber_InPlaceMatrixMultiply(PyObject *v, PyObject *w) -{ - return binary_iop(v, w, NB_SLOT(nb_inplace_matrix_multiply), - NB_SLOT(nb_matrix_multiply), "@="); -} - -PyObject * -PyNumber_InPlaceRemainder(PyObject *v, PyObject *w) -{ - return binary_iop(v, w, NB_SLOT(nb_inplace_remainder), - NB_SLOT(nb_remainder), "%="); -} - -PyObject * PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z) { return ternary_iop(v, w, z, NB_SLOT(nb_inplace_power), |