generate warning for old python versions if the -classic option is not been used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8793 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
767c902d35
commit
65e58e8ed9
1 changed files with 12 additions and 0 deletions
|
|
@ -564,6 +564,18 @@ public:
|
|||
Printf(f_runtime,"#define SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS\n");
|
||||
}
|
||||
|
||||
if (classic) {
|
||||
Printf(f_runtime,"#define SWIG_PYTHON_CLASSIC\n");
|
||||
}
|
||||
|
||||
Printf(f_header,"#if (PY_VERSION_HEX <= 0x02000000)\n");
|
||||
Printf(f_header,"# if !defined(SWIG_PYTHON_CLASSIC)\n");
|
||||
Printf(f_header,"# warning \"This python version probably requires to use swig with the '-classic' option\"\n");
|
||||
Printf(f_header,"# endif\n");
|
||||
Printf(f_header,"#endif\n");
|
||||
|
||||
|
||||
|
||||
/* Set module name */
|
||||
module = Copy(Getattr(n,"name"));
|
||||
mainmodule = Getattr(n,"name");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue