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:
Marcelo Matus 2006-02-11 20:14:01 +00:00
commit 65e58e8ed9

View file

@ -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");