summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-02-16 12:44:02 -0800
committerMark Spruiell <mes@zeroc.com>2009-02-16 12:44:02 -0800
commit7850a1273f217874f9a2ce1c195aed5205ce43e6 (patch)
treed5c99dccfeb91ed218674f82e6dfd2431ed6b31a /cpp/src/Slice/PythonUtil.cpp
parentBug 3715 filterMcppWarnings fix filtered strings. (diff)
downloadice-7850a1273f217874f9a2ce1c195aed5205ce43e6.tar.bz2
ice-7850a1273f217874f9a2ce1c195aed5205ce43e6.tar.xz
ice-7850a1273f217874f9a2ce1c195aed5205ce43e6.zip
bug 3731 - backward incompatibilities in Slice library
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;