From 7850a1273f217874f9a2ce1c195aed5205ce43e6 Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Mon, 16 Feb 2009 12:44:02 -0800 Subject: bug 3731 - backward incompatibilities in Slice library --- cpp/src/Slice/PythonUtil.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cpp/src/Slice/PythonUtil.cpp') 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 paths = includePaths; -- cgit v1.2.3