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:
William S Fulton 2007-07-03 22:39:35 +00:00
commit d269f9cd16
3 changed files with 23 additions and 2 deletions

View file

@ -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 {