Fix directors for some overloaded methods where the imtype resulted in identical methods being generated in the C# director class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5ec6a8ea61
commit
d269f9cd16
3 changed files with 23 additions and 2 deletions
|
|
@ -1,6 +1,13 @@
|
|||
Version 1.3.32 (in progress)
|
||||
============================
|
||||
|
||||
07/03/2007: wsfulton
|
||||
[C#] Fix directors for some overloaded methods where the imtype resulted in identical
|
||||
methods being generated in the C# director class, eg void foo(int *) and void foo(double *)
|
||||
used to generated two of these:
|
||||
|
||||
private void SwigDirectorfoo(IntPtr p) { ... }
|
||||
|
||||
06/25/2007: wsfulton
|
||||
[Java, C#] Some parameter name changes in std_vector.i allowing better targeting
|
||||
of typemaps for method parameters (for memory management of containers of pointers).
|
||||
|
|
|
|||
|
|
@ -30,5 +30,18 @@ public:
|
|||
virtual void method2(bool b) const {}
|
||||
};
|
||||
|
||||
class OverloadedPointers
|
||||
{
|
||||
public:
|
||||
virtual ~OverloadedPointers() {}
|
||||
virtual void method(int *p) const {}
|
||||
virtual void method(double *p) const {}
|
||||
virtual void method(bool &r) const {}
|
||||
virtual void method(short &r) const {}
|
||||
virtual void method(OverloadedClass *p) const {}
|
||||
virtual void method(OverloadedPointers *p) const {}
|
||||
virtual void notover(int *p) const {}
|
||||
};
|
||||
|
||||
%}
|
||||
|
||||
|
|
|
|||
|
|
@ -1569,8 +1569,9 @@ public:
|
|||
UpcallData *udata = Getitem(dmethods_seq, i);
|
||||
String *method = Getattr(udata, "method");
|
||||
String *methid = Getattr(udata, "class_methodidx");
|
||||
String *overname = Getattr(udata, "overname");
|
||||
Printf(proxy_class_code, " if (SwigDerivedClassHasMethod(\"%s\", swigMethodTypes%s))\n", method, methid);
|
||||
Printf(proxy_class_code, " swigDelegate%s = new SwigDelegate%s_%s(SwigDirector%s);\n", methid, proxy_class_name, methid, method);
|
||||
Printf(proxy_class_code, " swigDelegate%s = new SwigDelegate%s_%s(SwigDirector%s);\n", methid, proxy_class_name, methid, overname);
|
||||
}
|
||||
Printf(proxy_class_code, " %s.%s_director_connect(swigCPtr", imclass_name, proxy_class_name);
|
||||
for (int i = first_class_dmethod; i < curr_class_dmethod; ++i) {
|
||||
|
|
@ -3203,7 +3204,7 @@ public:
|
|||
String *imtypeout = Getattr(tp, "tmap:imtype:out"); // the type in the imtype typemap's out attribute overrides the type in the typemap
|
||||
if (imtypeout)
|
||||
tm = imtypeout;
|
||||
Printf(callback_def, " private %s SwigDirector%s(", tm, symname);
|
||||
Printf(callback_def, " private %s SwigDirector%s(", tm, overloaded_name);
|
||||
if (!ignored_method)
|
||||
Printf(director_delegate_definitions, " public delegate %s", tm);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue