]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove special handling of str and unicode in PyNumber_InPlaceRemainder. They
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 24 Nov 2002 01:07:42 +0000 (01:07 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 24 Nov 2002 01:07:42 +0000 (01:07 +0000)
both have a nb_remainer slot.

Objects/abstract.c

index 2df934db8afdc9fc687fc96575169ee6fcb9ce57..8845dce71c955c0562901ecc2cf936515d72f229 100644 (file)
@@ -764,15 +764,8 @@ PyNumber_InPlaceMultiply(PyObject *v, PyObject *w)
 PyObject *
 PyNumber_InPlaceRemainder(PyObject *v, PyObject *w)
 {
-       if (PyString_Check(v))
-               return PyString_Format(v, w);
-#ifdef Py_USING_UNICODE
-       else if (PyUnicode_Check(v))
-               return PyUnicode_Format(v, w);
-#endif
-       else
-               return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
-                                       NB_SLOT(nb_remainder), "%=");
+       return binary_iop(v, w, NB_SLOT(nb_inplace_remainder),
+                               NB_SLOT(nb_remainder), "%=");
 }
 
 PyObject *