File and line number corrections for warnings WARN_JAVA_MULTIPLE_INHERITANCE WARN_MODULA3_MULTIPLE_INHERITANCE WARN_CSHARP_MULTIPLE_INHERITANCE and errors 'The javabase typemap for proxy' 'No methodname attribute...' 'No methodmodifiers attribute...' 'The csbase typemap for proxy...'

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12224 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-09-20 19:11:55 +00:00
commit 6c094629cb
3 changed files with 20 additions and 25 deletions

View file

@ -1640,10 +1640,10 @@ public:
base = Next(base);
continue;
}
String *proxyclassname = SwigType_str(Getattr(n, "classtypeobj"), 0);
String *baseclassname = SwigType_str(Getattr(base.item, "name"), 0);
Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, input_file, line_number,
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in C#.\n", proxyclassname, baseclassname);
String *proxyclassname = Getattr(n, "classtypeobj");
String *baseclassname = Getattr(base.item, "name");
Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Java.\n", SwigType_namestr(proxyclassname), SwigType_namestr(baseclassname));
base = Next(base);
}
}
@ -1661,9 +1661,9 @@ public:
Delete(baseclass);
baseclass = NULL;
if (purebase_notderived)
Swig_error(input_file, line_number, "The csbase typemap for proxy %s must contain just one of the 'replace' or 'notderived' attributes.\n", typemap_lookup_type);
Swig_error(Getfile(n), Getline(n), "The csbase typemap for proxy %s must contain just one of the 'replace' or 'notderived' attributes.\n", typemap_lookup_type);
} else if (Len(pure_baseclass) > 0 && Len(baseclass) > 0) {
Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, input_file, line_number,
Swig_warning(WARN_CSHARP_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in C#. "
"Perhaps you need one of the 'replace' or 'notderived' attributes in the csbase typemap?\n", typemap_lookup_type, pure_baseclass);
}
@ -1704,10 +1704,10 @@ public:
}
if (tm && *Char(tm)) {
if (!destruct_methodname) {
Swig_error(input_file, line_number, "No methodname attribute defined in csdestruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
Swig_error(Getfile(n), Getline(n), "No methodname attribute defined in csdestruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
}
if (!destruct_methodmodifiers) {
Swig_error(input_file, line_number,
Swig_error(Getfile(n), Getline(n),
"No methodmodifiers attribute defined in csdestruct%s typemap for %s.\n", (derived ? "_derived" : ""), proxy_class_name);
}
}

View file

@ -1714,10 +1714,10 @@ public:
base = Next(base);
continue;
}
String *proxyclassname = SwigType_str(Getattr(n, "classtypeobj"), 0);
String *baseclassname = SwigType_str(Getattr(base.item, "name"), 0);
Swig_warning(WARN_JAVA_MULTIPLE_INHERITANCE, input_file, line_number,
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Java.\n", proxyclassname, baseclassname);
String *proxyclassname = Getattr(n, "classtypeobj");
String *baseclassname = Getattr(base.item, "name");
Swig_warning(WARN_JAVA_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Java.\n", SwigType_namestr(proxyclassname), SwigType_namestr(baseclassname));
base = Next(base);
}
}
@ -1735,9 +1735,9 @@ public:
Delete(baseclass);
baseclass = NULL;
if (purebase_notderived)
Swig_error(input_file, line_number, "The javabase typemap for proxy %s must contain just one of the 'replace' or 'notderived' attributes.\n", typemap_lookup_type);
Swig_error(Getfile(n), Getline(n), "The javabase typemap for proxy %s must contain just one of the 'replace' or 'notderived' attributes.\n", typemap_lookup_type);
} else if (Len(pure_baseclass) > 0 && Len(baseclass) > 0) {
Swig_warning(WARN_JAVA_MULTIPLE_INHERITANCE, input_file, line_number,
Swig_warning(WARN_JAVA_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Java. "
"Perhaps you need one of the 'replace' or 'notderived' attributes in the csbase typemap?\n", typemap_lookup_type, pure_baseclass);
}
@ -1772,12 +1772,10 @@ public:
}
if (tm && *Char(tm)) {
if (!destruct_methodname) {
Swig_error(input_file, line_number,
"No methodname attribute defined in javadestruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
Swig_error(Getfile(n), Getline(n), "No methodname attribute defined in javadestruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
}
if (!destruct_methodmodifiers) {
Swig_error(input_file, line_number,
"No methodmodifiers attribute defined in javadestruct%s typemap for %s.\n", (derived ? "_derived" : ""), proxy_class_name);
Swig_error(Getfile(n), Getline(n), "No methodmodifiers attribute defined in javadestruct%s typemap for %s.\n", (derived ? "_derived" : ""), proxy_class_name);
}
}
// Emit the finalize and delete methods

View file

@ -2222,8 +2222,7 @@ MODULA3():
}
base = Next(base);
if (base.item != NIL) {
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, input_file,
line_number,
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Modula 3.\n",
classDeclarationName, Getattr(base.item, "name"));
}
@ -2236,8 +2235,7 @@ MODULA3():
// Inheritance from pure Modula 3 classes
const String *pure_baseclass = typemapLookup(n, "m3base", classDeclarationName, WARN_NONE);
if (hasContent(pure_baseclass) && hasContent(baseclass)) {
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, input_file,
line_number,
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, Getfile(n), Getline(n),
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Modula 3.\n", classDeclarationName, pure_baseclass);
}
// Pure Modula 3 interfaces
@ -2273,7 +2271,7 @@ MODULA3():
destruct_methodname = Getattr(attributes, "tmap:m3destruct:methodname");
}
if (!destruct_methodname) {
Swig_error(input_file, line_number, "No methodname attribute defined in m3destruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
Swig_error(Getfile(n), Getline(n), "No methodname attribute defined in m3destruct%s typemap for %s\n", (derived ? "_derived" : ""), proxy_class_name);
}
// Emit the Finalize and Dispose methods
if (tm) {
@ -2466,8 +2464,7 @@ MODULA3():
Append(baseclassname, Getattr(base.item, "sym:name"));
base = Next(base);
if (base.item != NIL) {
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, input_file,
line_number,
Swig_warning(WARN_MODULA3_MULTIPLE_INHERITANCE, input_file, line_number,
"Warning for %s proxy: Base %s ignored. Multiple inheritance is not supported in Modula 3.\n",
proxy_class_name, Getattr(base.item, "name"));
}