summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index a0f075f..b646c36 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -565,6 +565,20 @@ PyNumber_Add(PyObject *v, PyObject *w)
}
PyObject *
+PyNumber_FloorDivide(PyObject *v, PyObject *w)
+{
+ /* XXX tp_flags test */
+ return binary_op(v, w, NB_SLOT(nb_floor_divide), "//");
+}
+
+PyObject *
+PyNumber_TrueDivide(PyObject *v, PyObject *w)
+{
+ /* XXX tp_flags test */
+ return binary_op(v, w, NB_SLOT(nb_true_divide), "/");
+}
+
+PyObject *
PyNumber_Remainder(PyObject *v, PyObject *w)
{
if (PyString_Check(v))
@@ -631,6 +645,22 @@ INPLACE_BINOP(PyNumber_InPlaceSubtract, nb_inplace_subtract, nb_subtract, "-=")
INPLACE_BINOP(PyNumber_InPlaceDivide, nb_inplace_divide, nb_divide, "/=")
PyObject *
+PyNumber_InPlaceFloorDivide(PyObject *v, PyObject *w)
+{
+ /* XXX tp_flags test */
+ return binary_iop(v, w, NB_SLOT(nb_inplace_floor_divide),
+ NB_SLOT(nb_floor_divide), "//=");
+}
+
+PyObject *
+PyNumber_InPlaceTrueDivide(PyObject *v, PyObject *w)
+{
+ /* XXX tp_flags test */
+ return binary_iop(v, w, NB_SLOT(nb_inplace_true_divide),
+ NB_SLOT(nb_true_divide), "/=");
+}
+
+PyObject *
PyNumber_InPlaceAdd(PyObject *v, PyObject *w)
{
binaryfunc f = NULL;