multiargument director typemap segfault fix (python)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4ef881fde4
commit
9b9680f3ac
2 changed files with 16 additions and 1 deletions
|
|
@ -1,6 +1,12 @@
|
||||||
Version 1.3.20 (In progress)
|
Version 1.3.20 (In progress)
|
||||||
============================
|
============================
|
||||||
|
|
||||||
|
06/25/2003: mrose (Mark Rose)
|
||||||
|
[Python] Director typemap marshalling checks for null pointers when
|
||||||
|
walking the parameter list instead of relying soley on the parameter
|
||||||
|
count. Cures a segfault that occured for multiple argument inv typemaps.
|
||||||
|
Someone with more Swig experience should probably review this code.
|
||||||
|
|
||||||
06/24/2003: mkoeppe (Matthias Koeppe)
|
06/24/2003: mkoeppe (Matthias Koeppe)
|
||||||
[Chicken] Don't emit calls to "C_check_for_interrupt",
|
[Chicken] Don't emit calls to "C_check_for_interrupt",
|
||||||
which may result in an endless loop. Patch by felix@proxima-mt.de.
|
which may result in an endless loop. Patch by felix@proxima-mt.de.
|
||||||
|
|
|
||||||
|
|
@ -1335,11 +1335,20 @@ public:
|
||||||
if (!is_void) outputs++;
|
if (!is_void) outputs++;
|
||||||
|
|
||||||
/* build argument list and type conversion string */
|
/* build argument list and type conversion string */
|
||||||
for (i=0, idx=0, p = l; i < num_arguments; i++) {
|
for (i=0, idx=0, p = l; i < num_arguments && p != 0; i++) {
|
||||||
|
|
||||||
|
if (checkAttribute(p,"tmap:in:numinputs","0")) {
|
||||||
|
p = Getattr(p,"tmap:in:next");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* old style? caused segfaults without the p!=0 check
|
||||||
|
in the for() condition, and seems dangerous in the
|
||||||
|
while loop as well.
|
||||||
while (Getattr(p, "tmap:ignore")) {
|
while (Getattr(p, "tmap:ignore")) {
|
||||||
p = Getattr(p, "tmap:ignore:next");
|
p = Getattr(p, "tmap:ignore:next");
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
|
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue