summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 7dc251b25df..cd0f126c9e1 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -1843,6 +1843,16 @@ Slice::Python::generate(const UnitPtr& un, bool all, bool checksum, const vector
out << nl << "import Ice, IcePy, __builtin__";
+ //
+ // For backward-compatibility with generated code from Ice 3.3.0, we add a definition
+ // of _struct_marker to the Ice module if necessary.
+ //
+ out << nl;
+ out << nl << "if not Ice.__dict__.has_key(\"_struct_marker\"):";
+ out.inc();
+ out << nl << "Ice._struct_marker = object()";
+ out.dec();
+
if(!all)
{
vector<string> paths = includePaths;