Document the module attribute in %import and add warning to Python for when it should be used

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10866 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-09-18 14:52:52 +00:00
commit 061e934bbc
6 changed files with 89 additions and 19 deletions

View file

@ -2864,7 +2864,12 @@ public:
b = First(baselist);
while (b.item) {
String *bname = Getattr(b.item, "python:proxy");
if (!bname || GetFlag(b.item, "feature:ignore")) {
bool ignore = GetFlag(b.item, "feature:ignore") ? true : false;
if (!bname || ignore) {
if (!bname && !ignore) {
Swig_warning(WARN_TYPE_UNDEFINED_CLASS, input_file, line_number,
"Base class '%s' ignored - unknown module name for base. Either import the appropriate module interface file or specify the name of the module in the %%import directive.\n", SwigType_namestr(Getattr(b.item, "name")));
}
b = Next(b);
continue;
}