Improve output formatting of generated code for overloaded methods

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-01-21 22:20:30 +00:00
commit 3ac369d8d0

View file

@ -1510,11 +1510,11 @@ public:
sibl = Getattr(sibl, "sym:previousSibling"); // go all the way up
String *protoTypes = NewString("");
do {
Printf(protoTypes, "\"\" %s(%s)\\n", Getattr(sibl, "name"), ParmList_protostr(Getattr(sibl, "wrap:parms")));
Printf(protoTypes, "\n\" %s(%s)\\n\"", Getattr(sibl, "name"), ParmList_protostr(Getattr(sibl, "wrap:parms")));
} while ((sibl = Getattr(sibl, "sym:nextSibling")));
Append(f->code, "fail:\n");
Printf(f->code, "SWIG_SetErrorMsg(PyExc_NotImplementedError,"
"\"Wrong number of arguments for overloaded function '%s'.\\n" " Possible C/C++ prototypes are:\\n%s\");\n", symname, protoTypes);
"\"Wrong number of arguments for overloaded function '%s'.\\n\"" "\n\" Possible C/C++ prototypes are:\\n\"%s);\n", symname, protoTypes);
Append(f->code, "return NULL;\n");
Delete(protoTypes);
}