Get rid of most of the rest of coerce (slot is still there for now).
diff --git a/Objects/object.c b/Objects/object.c
index 516098d..44b3f7d 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -681,9 +681,7 @@
b) have different types or a type without tp_compare; and
c) don't have a user-defined tp_compare.
tp_compare implementations in C assume that both arguments
- have their type, so we give up if the coercion fails or if
- it yields types which are still incompatible (which can
- happen with a user-defined nb_coerce).
+ have their type, so we give up if the coercion fails.
*/
c = PyNumber_CoerceEx(&v, &w);
if (c < 0)
@@ -1513,22 +1511,6 @@
return 1;
}
-/* Coerce two numeric types to the "larger" one.
- Increment the reference count on each argument.
- Return -1 and raise an exception if no coercion is possible
- (and then no reference count is incremented).
-*/
-int
-PyNumber_Coerce(PyObject **pv, PyObject **pw)
-{
- int err = PyNumber_CoerceEx(pv, pw);
- if (err <= 0)
- return err;
- PyErr_SetString(PyExc_TypeError, "number coercion failed");
- return -1;
-}
-
-
/* Test whether an object can be called */
int