gdb/
Workaround Python 2.6. * python/py-utils.c (gdb_pymodule_addobject): Wrap Py_DECREF into a block.
This commit is contained in:
parent
44e9736318
commit
ff6009d09a
2 changed files with 10 additions and 1 deletions
|
@ -443,6 +443,9 @@ gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object)
|
|||
Py_INCREF (object);
|
||||
result = PyModule_AddObject (module, name, object);
|
||||
if (result < 0)
|
||||
Py_DECREF (object);
|
||||
{
|
||||
/* Python 2.6 did not wrap Py_DECREF in do { } while (0);. */
|
||||
Py_DECREF (object);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue