summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2002-07-05 05:51:09 +0000
committerMichi Henning <michi@zeroc.com>2002-07-05 05:51:09 +0000
commitfb87cc511bc90bb3ba0a07846ae77a72075a9900 (patch)
tree0d81a0723444710f564da26c55870993d61b23d4 /cpp/src/slice2cpp
parentAdded enumerator for ConstDef::contained() (ContainedTypeConstant) to (diff)
downloadice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.tar.bz2
ice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.tar.xz
ice-fb87cc511bc90bb3ba0a07846ae77a72075a9900.zip
Move the ICE_INT64_LITERAL macro into its own header file (Ice/Const.h).
That was cleaner than polluting the generated files with the macro definition over and over...
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r--cpp/src/slice2cpp/Gen.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 06bec36200c..eda491f8fb6 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -199,6 +199,11 @@ Slice::Gen::generate(const UnitPtr& unit)
H << "\n#include <Ice/LocalObject.h>";
}
+ if(unit->usesConsts())
+ {
+ H << "\n#include <Ice/Const.h>";
+ }
+
StringList includes = unit->includeFiles();
for(StringList::const_iterator q = includes.begin(); q != includes.end(); ++q)
{
@@ -214,8 +219,6 @@ Slice::Gen::generate(const UnitPtr& unit)
_dllExport += " ";
}
- printDefInt64Macro(H);
-
ProxyDeclVisitor proxyDeclVisitor(H, C, _dllExport);
unit->visit(&proxyDeclVisitor);
@@ -265,8 +268,6 @@ Slice::Gen::generate(const UnitPtr& unit)
ImplVisitor implVisitor(implH, implC, _dllExport);
unit->visit(&implVisitor);
}
-
- printUndefInt64Macro(H);
}
Slice::Gen::TypesVisitor::TypesVisitor(Output& h, Output& c, const string& dllExport) :
@@ -983,7 +984,7 @@ Slice::Gen::TypesVisitor::visitConstDef(const ConstDefPtr& p)
}
else if(bp && bp->kind() == Builtin::KindLong)
{
- H << "INT64LITERAL(" << p->value() << ")";
+ H << "ICE_INT64_LITERAL(" << p->value() << ")";
}
else
{