2009-09-21 Jason Orendorff <jason.orendorff@gmail.com>
PR python/10666: * python/py-function.c (fnpy_init): Use xstrdup.
This commit is contained in:
parent
943fef64b2
commit
ce0420dced
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2009-09-21 Jason Orendorff <jason.orendorff@gmail.com>
|
||||||
|
|
||||||
|
PR python/10666:
|
||||||
|
* python/py-function.c (fnpy_init): Use xstrdup.
|
||||||
|
|
||||||
2009-09-21 Jie Zhang <jie.zhang@analog.com>
|
2009-09-21 Jie Zhang <jie.zhang@analog.com>
|
||||||
|
|
||||||
* doc/gdb.texinfo: Escape "{" and "}".
|
* doc/gdb.texinfo: Escape "{" and "}".
|
||||||
|
|
|
@ -112,11 +112,10 @@ fnpy_init (PyObject *self, PyObject *args, PyObject *kwds)
|
||||||
{
|
{
|
||||||
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 && gdbpy_is_string (ds_obj))
|
||||||
/* Nothing ever frees this. */
|
|
||||||
docstring = python_string_to_host_string (ds_obj);
|
docstring = python_string_to_host_string (ds_obj);
|
||||||
}
|
}
|
||||||
if (! docstring)
|
if (! docstring)
|
||||||
docstring = _("This function is not documented.");
|
docstring = xstrdup (_("This function is not documented."));
|
||||||
|
|
||||||
add_internal_function (name, docstring, fnpy_call, self);
|
add_internal_function (name, docstring, fnpy_call, self);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue