Fix director operator pointer casts

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-11-09 22:32:28 +00:00
commit 8c2b66a11d
7 changed files with 83 additions and 111 deletions

View file

@ -2073,7 +2073,7 @@ public:
Wrapper *w = NewWrapper();
String *call;
String *basetype = Getattr(parent, "classtype");
String *target = Swig_method_decl(decl, classname, parms, 0, 0);
String *target = Swig_method_decl(0, decl, classname, parms, 0, 0);
call = Swig_csuperclass_call(0, basetype, superparms);
Printf(w->def, "%s::%s: %s, Swig::Director(self) { }", classname, target, call);
Delete(target);
@ -2084,7 +2084,7 @@ public:
/* constructor header */
{
String *target = Swig_method_decl(decl, classname, parms, 0, 1);
String *target = Swig_method_decl(0, decl, classname, parms, 0, 1);
Printf(f_directors_h, " %s;\n", target);
Delete(target);
}
@ -2264,20 +2264,14 @@ public:
String *target;
String *pclassname = NewStringf("SwigDirector_%s", classname);
String *qualified_name = NewStringf("%s::%s", pclassname, name);
target = Swig_method_decl(decl, qualified_name, l, 0, 0);
String *rtype = SwigType_str(type, 0);
if (Getattr(n, "conversion_operator"))
Printf(w->def, "%s", target);
else
Printf(w->def, "%s %s", rtype, target);
SwigType *rtype = Getattr(n, "conversion_operator") ? 0 : type;
target = Swig_method_decl(rtype, decl, qualified_name, l, 0, 0);
Printf(w->def, "%s", target);
Delete(qualified_name);
Delete(target);
/* header declaration */
target = Swig_method_decl(decl, name, l, 0, 1);
if (Getattr(n, "conversion_operator"))
Printf(declaration, " virtual %s", target);
else
Printf(declaration, " virtual %s %s", rtype, target);
target = Swig_method_decl(rtype, decl, name, l, 0, 1);
Printf(declaration, " virtual %s", target);
Delete(target);
// Get any exception classes in the throws typemap
@ -2579,7 +2573,6 @@ public:
/* clean up */
Delete(wrap_args);
Delete(rtype);
Delete(return_type);
Delete(pclassname);
DelWrapper(w);