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
|
@ -1,3 +1,9 @@
|
||||||
|
2013-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Workaround Python 2.6.
|
||||||
|
* python/py-utils.c (gdb_pymodule_addobject): Wrap Py_DECREF into
|
||||||
|
a block.
|
||||||
|
|
||||||
2013-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2013-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
Code cleanup: constification.
|
Code cleanup: constification.
|
||||||
|
|
|
@ -443,6 +443,9 @@ gdb_pymodule_addobject (PyObject *module, const char *name, PyObject *object)
|
||||||
Py_INCREF (object);
|
Py_INCREF (object);
|
||||||
result = PyModule_AddObject (module, name, object);
|
result = PyModule_AddObject (module, name, object);
|
||||||
if (result < 0)
|
if (result < 0)
|
||||||
Py_DECREF (object);
|
{
|
||||||
|
/* Python 2.6 did not wrap Py_DECREF in do { } while (0);. */
|
||||||
|
Py_DECREF (object);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue