]> granicus.if.org Git - python/commitdiff
Undo another glitch of the automatic not-so-Grand Renaming; some local
authorGuido van Rossum <guido@python.org>
Tue, 18 Nov 1997 19:23:07 +0000 (19:23 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 18 Nov 1997 19:23:07 +0000 (19:23 +0000)
variables called 'coerce' were accidentally renamed to
'PyNumber_Coerce'.  Rename them back to coercefunc.

Objects/classobject.c

index 1e8be013f1aac7c63b8395c502bd1dc65541ba40..b67265b1c353723fa997e82b4a520c54d06e3e4b 100644 (file)
@@ -1053,7 +1053,7 @@ halfbinop(v, w, opname, r_result, thisfunc, swapped)
 {
        PyObject *func;
        PyObject *args;
-       PyObject *PyNumber_Coerce;
+       PyObject *coercefunc;
        PyObject *coerced = NULL;
        PyObject *v1;
        
@@ -1064,8 +1064,8 @@ halfbinop(v, w, opname, r_result, thisfunc, swapped)
                if (coerce_obj == NULL)
                        return -1;
        }
-       PyNumber_Coerce = PyObject_GetAttr(v, coerce_obj);
-       if (PyNumber_Coerce == NULL) {
+       coercefunc = PyObject_GetAttr(v, coerce_obj);
+       if (coercefunc == NULL) {
                PyErr_Clear();
        }
        else {
@@ -1073,9 +1073,9 @@ halfbinop(v, w, opname, r_result, thisfunc, swapped)
                if (args == NULL) {
                        return -1;
                }
-               coerced = PyEval_CallObject(PyNumber_Coerce, args);
+               coerced = PyEval_CallObject(coercefunc, args);
                Py_DECREF(args);
-               Py_DECREF(PyNumber_Coerce);
+               Py_DECREF(coercefunc);
                if (coerced == NULL) {
                        return -1;
                }
@@ -1132,7 +1132,7 @@ instance_coerce(pv, pw)
 {
        PyObject *v = *pv;
        PyObject *w = *pw;
-       PyObject *PyNumber_Coerce;
+       PyObject *coercefunc;
        PyObject *args;
        PyObject *coerced;
 
@@ -1141,8 +1141,8 @@ instance_coerce(pv, pw)
                if (coerce_obj == NULL)
                        return -1;
        }
-       PyNumber_Coerce = PyObject_GetAttr(v, coerce_obj);
-       if (PyNumber_Coerce == NULL) {
+       coercefunc = PyObject_GetAttr(v, coerce_obj);
+       if (coercefunc == NULL) {
                /* No __coerce__ method: always OK */
                PyErr_Clear();
                Py_INCREF(v);
@@ -1154,9 +1154,9 @@ instance_coerce(pv, pw)
        if (args == NULL) {
                return -1;
        }
-       coerced = PyEval_CallObject(PyNumber_Coerce, args);
+       coerced = PyEval_CallObject(coercefunc, args);
        Py_DECREF(args);
-       Py_DECREF(PyNumber_Coerce);
+       Py_DECREF(coercefunc);
        if (coerced == NULL) {
                /* __coerce__ call raised an exception */
                return -1;