Rename dubiously named local variable 'cmpfunc' -- this is also a

typedef, and at least one compiler choked on this.

(SF patch #103457, by bquinlan)
This commit is contained in:
Guido van Rossum 2001-01-29 23:50:25 +00:00
parent 2b724da8d9
commit 3202c6fac8
1 changed files with 5 additions and 5 deletions

View File

@ -1409,7 +1409,7 @@ half_cmp(PyObject *v, PyObject *w)
{ {
static PyObject *cmp_obj; static PyObject *cmp_obj;
PyObject *args; PyObject *args;
PyObject *cmpfunc; PyObject *cmp_func;
PyObject *result; PyObject *result;
long l; long l;
@ -1421,8 +1421,8 @@ half_cmp(PyObject *v, PyObject *w)
return -2; return -2;
} }
cmpfunc = PyObject_GetAttr(v, cmp_obj); cmp_func = PyObject_GetAttr(v, cmp_obj);
if (cmpfunc == NULL) { if (cmp_func == NULL) {
PyErr_Clear(); PyErr_Clear();
return 2; return 2;
} }
@ -1431,9 +1431,9 @@ half_cmp(PyObject *v, PyObject *w)
if (args == NULL) if (args == NULL)
return -2; return -2;
result = PyEval_CallObject(cmpfunc, args); result = PyEval_CallObject(cmp_func, args);
Py_DECREF(args); Py_DECREF(args);
Py_DECREF(cmpfunc); Py_DECREF(cmp_func);
if (result == NULL) if (result == NULL)
return -2; return -2;