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
|
|
@ -1335,11 +1335,20 @@ public:
|
|||
if (!is_void) outputs++;
|
||||
|
||||
/* 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")) {
|
||||
p = Getattr(p, "tmap:ignore:next");
|
||||
}
|
||||
*/
|
||||
|
||||
if (Getattr(p, "tmap:argoutv") != 0) outputs++;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue