Skip to content

Commit f5aebab

Browse files
corona10remykarem
authored andcommitted
bpo-45760: Remove PyNumber_InMatrixMultiply (pythonGH-29751)
1 parent e9f8b0f commit f5aebab

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

Objects/abstract.c

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,21 +1248,10 @@ INPLACE_BINOP(PyNumber_InPlaceAnd, nb_inplace_and, nb_and, "&=")
12481248
INPLACE_BINOP(PyNumber_InPlaceLshift, nb_inplace_lshift, nb_lshift, "<<=")
12491249
INPLACE_BINOP(PyNumber_InPlaceRshift, nb_inplace_rshift, nb_rshift, ">>=")
12501250
INPLACE_BINOP(PyNumber_InPlaceSubtract, nb_inplace_subtract, nb_subtract, "-=")
1251-
INPLACE_BINOP(PyNumber_InMatrixMultiply, nb_inplace_matrix_multiply, nb_matrix_multiply, "@=")
1252-
1253-
PyObject *
1254-
PyNumber_InPlaceFloorDivide(PyObject *v, PyObject *w)
1255-
{
1256-
return binary_iop(v, w, NB_SLOT(nb_inplace_floor_divide),
1257-
NB_SLOT(nb_floor_divide), "//=");
1258-
}
1259-
1260-
PyObject *
1261-
PyNumber_InPlaceTrueDivide(PyObject *v, PyObject *w)
1262-
{
1263-
return binary_iop(v, w, NB_SLOT(nb_inplace_true_divide),
1264-
NB_SLOT(nb_true_divide), "/=");
1265-
}
1251+
INPLACE_BINOP(PyNumber_InPlaceMatrixMultiply, nb_inplace_matrix_multiply, nb_matrix_multiply, "@=")
1252+
INPLACE_BINOP(PyNumber_InPlaceFloorDivide, nb_inplace_floor_divide, nb_floor_divide, "//=")
1253+
INPLACE_BINOP(PyNumber_InPlaceTrueDivide, nb_inplace_true_divide, nb_true_divide, "/=")
1254+
INPLACE_BINOP(PyNumber_InPlaceRemainder, nb_inplace_remainder, nb_remainder, "%=")
12661255

12671256
PyObject *
12681257
PyNumber_InPlaceAdd(PyObject *v, PyObject *w)
@@ -1316,20 +1305,6 @@ PyNumber_InPlaceMultiply(PyObject *v, PyObject *w)
13161305
return result;
13171306
}
13181307

1319-
PyObject *
1320-
PyNumber_InPlaceMatrixMultiply(PyObject *v, PyObject *w)
1321-
{
1322-
return binary_iop(v, w, NB_SLOT(nb_inplace_matrix_multiply),
1323-
NB_SLOT(nb_matrix_multiply), "@=");
1324-
}
1325-
1326-
PyObject *
1327-
PyNumber_InPlaceRemainder(PyObject *v, PyObject *w)
1328-
{
1329-
return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
1330-
NB_SLOT(nb_remainder), "%=");
1331-
}
1332-
13331308
PyObject *
13341309
PyNumber_InPlacePower(PyObject *v, PyObject *w, PyObject *z)
13351310
{

0 commit comments

Comments
 (0)