summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/Modules/python.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index 83c00929c..41569cb18 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -4498,10 +4498,8 @@ public:
Delete(rname);
}
} else {
- if (!py3) {
- if (GetFlag(n, "feature:python:nondynamic"))
- Printv(f_shadow, "@_swig_add_metaclass(_SwigNonDynamicMeta)\n", NIL);
- }
+ if (GetFlag(n, "feature:python:nondynamic"))
+ Printv(f_shadow, "@_swig_add_metaclass(_SwigNonDynamicMeta)\n", NIL);
Printv(f_shadow, "class ", class_name, NIL);
if (Len(base_class)) {
@@ -4511,9 +4509,11 @@ public:
Printf(f_shadow, "(Exception)");
} else {
Printf(f_shadow, "(object");
- if (py3 && GetFlag(n, "feature:python:nondynamic")) {
+ /* Replace @_swig_add_metaclass above with below when support for python 2.7 is dropped
+ if (GetFlag(n, "feature:python:nondynamic")) {
Printf(f_shadow, ", metaclass=_SwigNonDynamicMeta");
}
+ */
Printf(f_shadow, ")");
}
}