@@ -393,8 +393,8 @@ String *Swig_cfunction_call(const_String_or_char_ptr name, ParmList *parms) {
393393
394394 while (p ) {
395395 SwigType * pt = Getattr (p , "type" );
396- SwigType * rpt = SwigType_typedef_resolve_all ( pt );
397- if (( SwigType_type ( rpt ) != T_VOID )) {
396+ if (( SwigType_type ( pt ) != T_VOID )) {
397+ SwigType * rpt = SwigType_typedef_resolve_all ( pt );
398398 String * pname = Swig_cparm_name (p , i );
399399 String * rcaststr = SwigType_rcaststr (rpt , pname );
400400 if (comma )
@@ -431,6 +431,7 @@ static String *Swig_cmethod_call(const_String_or_char_ptr name, ParmList *parms,
431431 String * func , * nname ;
432432 int i = 0 ;
433433 Parm * p = parms ;
434+ SwigType * pt ;
434435 int comma = 0 ;
435436
436437 func = NewStringEmpty ();
@@ -455,7 +456,7 @@ static String *Swig_cmethod_call(const_String_or_char_ptr name, ParmList *parms,
455456 Replaceall (func , "this" , rcaststr );
456457 Delete (rcaststr );
457458 } else {
458- SwigType * pt = Getattr (p , "type" );
459+ pt = Getattr (p , "type" );
459460
460461 /* If the method is invoked through a dereferenced pointer, we don't add any casts
461462 (needed for smart pointers). Otherwise, we cast to the appropriate type */
@@ -491,14 +492,13 @@ static String *Swig_cmethod_call(const_String_or_char_ptr name, ParmList *parms,
491492 i ++ ;
492493 p = nextSibling (p );
493494 while (p ) {
494- SwigType * pt = Getattr (p , "type" );
495- SwigType * rpt = SwigType_typedef_resolve_all (pt );
496- if ((SwigType_type (rpt ) != T_VOID )) {
495+ pt = Getattr (p , "type" );
496+ if ((SwigType_type (pt ) != T_VOID )) {
497497 String * pname = Swig_cparm_name (p , i );
498498 String * rcaststr = SwigType_rcaststr (pt , pname );
499499 if (comma )
500500 Append (func , "," );
501- if (cparse_cplusplus && SwigType_type (rpt ) == T_USER )
501+ if (cparse_cplusplus && SwigType_type (pt ) == T_USER )
502502 Printv (func , "SWIG_STD_MOVE(" , rcaststr , ")" , NIL );
503503 else
504504 Printv (func , rcaststr , NIL );
@@ -547,6 +547,7 @@ static String *Swig_cppconstructor_base_call(const_String_or_char_ptr name, Parm
547547 int i = 0 ;
548548 int comma = 0 ;
549549 Parm * p = parms ;
550+ SwigType * pt ;
550551 if (skip_self ) {
551552 if (p )
552553 p = nextSibling (p );
@@ -556,9 +557,8 @@ static String *Swig_cppconstructor_base_call(const_String_or_char_ptr name, Parm
556557 func = NewStringEmpty ();
557558 Printf (func , "new %s(" , nname );
558559 while (p ) {
559- SwigType * pt = Getattr (p , "type" );
560- SwigType * rpt = SwigType_typedef_resolve_all (pt );
561- if ((SwigType_type (rpt ) != T_VOID )) {
560+ pt = Getattr (p , "type" );
561+ if ((SwigType_type (pt ) != T_VOID )) {
562562 String * rcaststr = 0 ;
563563 String * pname = 0 ;
564564 if (comma )
@@ -574,7 +574,7 @@ static String *Swig_cppconstructor_base_call(const_String_or_char_ptr name, Parm
574574 pname = Copy (Getattr (p , "name" ));
575575 }
576576 rcaststr = SwigType_rcaststr (pt , pname );
577- if (cparse_cplusplus && SwigType_type (rpt ) == T_USER )
577+ if (cparse_cplusplus && SwigType_type (pt ) == T_USER )
578578 Printv (func , "SWIG_STD_MOVE(" , rcaststr , ")" , NIL );
579579 else
580580 Printv (func , rcaststr , NIL );
0 commit comments