director error message fixes to correctly generate templated class names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9401 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e1f7b3a405
commit
8d333d90f0
5 changed files with 22 additions and 31 deletions
|
|
@ -2960,11 +2960,11 @@ class CSHARP : public Language {
|
|||
int classDirectorMethod(Node *n, Node *parent, String *super) {
|
||||
String *empty_str = NewString("");
|
||||
String *classname = Getattr(parent, "sym:name");
|
||||
String *c_classname = Getattr(parent, "name");
|
||||
String *name = Getattr(n, "name");
|
||||
String *symname = Getattr(n, "sym:name");
|
||||
SwigType *type = Getattr(n, "type");
|
||||
SwigType *returntype = Getattr(n,"returntype");
|
||||
String *c_classname = NULL;
|
||||
String *overloaded_name = getOverloadedName(n);
|
||||
String *storage = Getattr(n, "storage");
|
||||
String *value = Getattr(n, "value");
|
||||
|
|
@ -3001,12 +3001,6 @@ class CSHARP : public Language {
|
|||
|
||||
imclass_dmethod = NewStringf("SwigDirector_%s", Swig_name_member(classname, overloaded_name));
|
||||
|
||||
// Get the C++ name for the parent node (should be a class... hint)
|
||||
|
||||
c_classname = Getattr(parent, "name");
|
||||
if (!(Cmp(type, "class")))
|
||||
c_classname = classname;
|
||||
|
||||
if (returntype) {
|
||||
|
||||
qualified_return = SwigType_rcaststr(returntype, "result");
|
||||
|
|
@ -3127,7 +3121,7 @@ class CSHARP : public Language {
|
|||
}
|
||||
Delete(super_call);
|
||||
} else {
|
||||
Printf(w->code, " throw Swig::DirectorPureVirtualException(\"%s::%s\");\n", c_classname, name);
|
||||
Printf(w->code, " throw Swig::DirectorPureVirtualException(\"%s::%s\");\n", SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||
}
|
||||
|
||||
if (!ignored_method)
|
||||
|
|
@ -3364,7 +3358,7 @@ class CSHARP : public Language {
|
|||
Printf(w->code, "%s\n", tm);
|
||||
} else {
|
||||
Swig_warning(WARN_TYPEMAP_DIRECTOROUT_UNDEF, input_file, line_number,
|
||||
"Unable to use return type %s in director method %s::%s (skipping method).\n", SwigType_str(returntype, 0), classname, name);
|
||||
"Unable to use return type %s in director method %s::%s (skipping method).\n", SwigType_str(returntype, 0), SwigType_namestr(c_classname), SwigType_namestr(name));
|
||||
output_director = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue