Fix "_swig_property" fix to work with Python 2.1 as well.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9438 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fa25ee685c
commit
5090f60fa8
1 changed files with 6 additions and 1 deletions
|
|
@ -694,7 +694,12 @@ public:
|
|||
Printv(f_shadow,"import new\n",NULL);
|
||||
Printv(f_shadow,"new_instancemethod = new.instancemethod\n",NULL);
|
||||
if (modern || !classic) {
|
||||
Printv(f_shadow, "_swig_property = property\n", NULL);
|
||||
Printv(f_shadow,
|
||||
"try:\n",
|
||||
tab4, "_swig_property = property\n",
|
||||
"except NameError:\n",
|
||||
tab4, "pass # Python < 2.2 doesn't have 'property'.\n",
|
||||
NULL);
|
||||
}
|
||||
/* if (!modern) */
|
||||
/* always needed, a class can be forced to be no-modern, such as an exception */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue