This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 035/238] [index] python/py-evtregistry.c: -Wshadow fix
- From: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- To: gdb-patches at sourceware dot org
- Cc: Andrey Smirnov <andrew dot smirnov at gmail dot com>
- Date: Mon, 12 Dec 2011 19:38:38 -0800
- Subject: [PATCH 035/238] [index] python/py-evtregistry.c: -Wshadow fix
To ChangeLog:
* python/py-evtregistry.c (evregpy_disconnect): Rename `index' to
`idx'(-Wshadow).
---
gdb/python/py-evtregistry.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/python/py-evtregistry.c b/gdb/python/py-evtregistry.c
index 67d5715..b5fc811 100644
--- a/gdb/python/py-evtregistry.c
+++ b/gdb/python/py-evtregistry.c
@@ -56,17 +56,17 @@ static PyObject *
evregpy_disconnect (PyObject *self, PyObject *function)
{
PyObject *func;
- int index;
+ int idx;
PyObject *callback_list = (((eventregistry_object *) self)->callbacks);
if (!PyArg_ParseTuple (function, "O", &func))
return NULL;
- index = PySequence_Index (callback_list, func);
- if (index < 0)
+ idx = PySequence_Index (callback_list, func);
+ if (idx < 0)
Py_RETURN_NONE;
- if (PySequence_DelItem (callback_list, index) < 0)
+ if (PySequence_DelItem (callback_list, idx) < 0)
return NULL;
Py_RETURN_NONE;
--
1.7.5.4