Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3202c6f

Browse files
committed
Rename dubiously named local variable 'cmpfunc' -- this is also a
typedef, and at least one compiler choked on this. (SF patch #103457, by bquinlan)
1 parent 2b724da commit 3202c6f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Objects/classobject.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ half_cmp(PyObject *v, PyObject *w)
14091409
{
14101410
static PyObject *cmp_obj;
14111411
PyObject *args;
1412-
PyObject *cmpfunc;
1412+
PyObject *cmp_func;
14131413
PyObject *result;
14141414
long l;
14151415

@@ -1421,8 +1421,8 @@ half_cmp(PyObject *v, PyObject *w)
14211421
return -2;
14221422
}
14231423

1424-
cmpfunc = PyObject_GetAttr(v, cmp_obj);
1425-
if (cmpfunc == NULL) {
1424+
cmp_func = PyObject_GetAttr(v, cmp_obj);
1425+
if (cmp_func == NULL) {
14261426
PyErr_Clear();
14271427
return 2;
14281428
}
@@ -1431,9 +1431,9 @@ half_cmp(PyObject *v, PyObject *w)
14311431
if (args == NULL)
14321432
return -2;
14331433

1434-
result = PyEval_CallObject(cmpfunc, args);
1434+
result = PyEval_CallObject(cmp_func, args);
14351435
Py_DECREF(args);
1436-
Py_DECREF(cmpfunc);
1436+
Py_DECREF(cmp_func);
14371437

14381438
if (result == NULL)
14391439
return -2;

0 commit comments

Comments
 (0)