#1252 C# Director: method with more than 2 argouts => bad .cs

closed-fixed
csharp (36)
5
2012-08-05
2012-06-19
Anonymous
No

Corner case simpler to ilustrate with an example:

%module(directors="1") totolib

%feature(director) foo;
%feature(director) bar;

%inline %{
class foo
{
public:
virtual ~foo() {};
virtual int dofoo(int& one, int& two, int& three) {return 0;}
};

class bar : public foo
{
};
%}

in the generated bar.cs

private int SwigDirectordofoo(IntPtr one, IntPtr two, IntPtr r.int) {
return dofoo(new SWIGTYPE_p_int(one, false), new SWIGTYPE_p_int(two, false), new SWIGTYPE_p_int(r.int, false));
}

The third argument name is not a valid. Doesn't occur if any of the argument is switch to a value type. Also doesn't occur if bar overrides dofoo().

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-06-19

    Badly generated C# code.

     
  • William Fulton

    William Fulton - 2012-08-05

    Fixed for swig-2.0.8.

     
  • William Fulton

    William Fulton - 2012-08-05
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks