[PATCH 035/238] [index] python/py-evtregistry.c: -Wshadow fix

Andrey Smirnov andrew.smirnov@gmail.com
Tue Dec 13 03:41:00 GMT 2011


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



More information about the Gdb-patches mailing list