Fixing a bug where the cached doxygen docstring could be deleted while still in use, causing swig to segfault
This commit is contained in:
parent
5106573b29
commit
e150d58092
2 changed files with 8 additions and 0 deletions
|
|
@ -18,6 +18,9 @@ Version 4.0.0 (in progress)
|
||||||
Only show a single documentation entry for functions with default arguments when
|
Only show a single documentation entry for functions with default arguments when
|
||||||
using autodoc.
|
using autodoc.
|
||||||
|
|
||||||
|
Fixed a bug where a cached doxygen docstring could be deleted while still in use,
|
||||||
|
causing swig to segfault.
|
||||||
|
|
||||||
2019-01-22: vadz
|
2019-01-22: vadz
|
||||||
[Ruby, Octave] #1424 Improve autodoc parameter naming.
|
[Ruby, Octave] #1424 Improve autodoc parameter naming.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1571,6 +1571,11 @@ public:
|
||||||
// depends on the comment which is not going to change, so we can
|
// depends on the comment which is not going to change, so we can
|
||||||
// safely cache it.
|
// safely cache it.
|
||||||
Setattr(n, "python:docstring", Copy(docstr));
|
Setattr(n, "python:docstring", Copy(docstr));
|
||||||
|
} else {
|
||||||
|
// Must copy here since if the docstring is multi-line, the String*
|
||||||
|
// here will get Deleted below, which is bad if it is a pointer to
|
||||||
|
// the cached object!
|
||||||
|
docstr = Copy(docstr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue