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>
+
+ 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>
Code cleanup: constification.
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;
}