From: Guido van Rossum Date: Tue, 18 Nov 1997 19:23:07 +0000 (+0000) Subject: Undo another glitch of the automatic not-so-Grand Renaming; some local X-Git-Tag: v1.5b1~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3931df92506c60a8060c78709f05ee1afad2e788;p=thirdparty%2FPython%2Fcpython.git Undo another glitch of the automatic not-so-Grand Renaming; some local variables called 'coerce' were accidentally renamed to 'PyNumber_Coerce'. Rename them back to coercefunc. --- diff --git a/Objects/classobject.c b/Objects/classobject.c index 1e8be013f1aa..b67265b1c353 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -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;