mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
* python/py-function.c (fnpy_init): Decref result of
PyObject_GetAttrString.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/py-function.c (fnpy_init): Decref result of
|
||||||
|
PyObject_GetAttrString.
|
||||||
|
|
||||||
2013-05-20 Tom Tromey <tromey@redhat.com>
|
2013-05-20 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/py-threadevent.c (get_event_thread): Use
|
* python/py-threadevent.c (get_event_thread): Use
|
||||||
|
@ -175,15 +175,21 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
|
|||||||
if (PyObject_HasAttrString (self, "__doc__"))
|
if (PyObject_HasAttrString (self, "__doc__"))
|
||||||
{
|
{
|
||||||
PyObject *ds_obj = PyObject_GetAttrString (self, "__doc__");
|
PyObject *ds_obj = PyObject_GetAttrString (self, "__doc__");
|
||||||
if (ds_obj && gdbpy_is_string (ds_obj))
|
if (ds_obj != NULL)
|
||||||
|
{
|
||||||
|
if (gdbpy_is_string (ds_obj))
|
||||||
{
|
{
|
||||||
docstring = python_string_to_host_string (ds_obj);
|
docstring = python_string_to_host_string (ds_obj);
|
||||||
if (docstring == NULL)
|
if (docstring == NULL)
|
||||||
{
|
{
|
||||||
Py_DECREF (self);
|
Py_DECREF (self);
|
||||||
|
Py_DECREF (ds_obj);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Py_DECREF (ds_obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (! docstring)
|
if (! docstring)
|
||||||
docstring = xstrdup (_("This function is not documented."));
|
docstring = xstrdup (_("This function is not documented."));
|
||||||
|
Reference in New Issue
Block a user