From bb1b84d1436f26eb8c1941eedb97e943e81947bb Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 5 Jul 2002 04:05:42 +0000 Subject: Changed the way 64-bit literals are done in the generated code. The approach used now (a macro) makes the generated source more readable than the previous one. --- cpp/src/Slice/CPlusPlusUtil.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp') diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 0c800c87ac4..79725c6f4b4 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -87,6 +87,26 @@ Slice::printVersionCheck(Output& out) out << "\n#endif"; } +void +Slice::printDefInt64Macro(Output& out) +{ + out << "\n"; + out << "\n#if defined(_WIN32)"; + out << "\n# define INT64LITERAL(n) n##i64"; + out << "\n#elif defined(__linux__) && defined(i386)"; + out << "\n# define INT64LITERAL(n) n##LL"; + out << "\n#else"; + out << "\n# error \"Unsupported operating system or platform!\""; + out << "\n#endif"; +} + +void +Slice::printUndefInt64Macro(Output& out) +{ + out << "\n"; + out << "\n#undef INT64LITERAL"; +} + void Slice::printDllExportStuff(Output& out, const string& dllExport) { -- cgit v1.2.3