From c1ce7caa97b3dd6f7536d5c3b8b482d823c51891 Mon Sep 17 00:00:00 2001 From: Mark Spruiell Date: Mon, 2 Feb 2009 10:15:06 -0800 Subject: bug 3644 - improve integration between eclipse plugin and translator bug 3657 - improve error reporting in translators --- cpp/include/Slice/Preprocessor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpp/include/Slice/Preprocessor.h') diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index 54535e28812..c1b6c806e5f 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -38,7 +38,7 @@ public: FILE* preprocess(bool); bool close(); - enum Language { CPlusPlus, Java, CSharp, VisualBasic }; + enum Language { CPlusPlus, Java, JavaXML, CSharp, VisualBasic }; bool printMakefileDependencies(Language, const std::vector&); -- cgit v1.2.3 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/include/Slice/Preprocessor.h | 5 ++--- cpp/src/Slice/Preprocessor.cpp | 8 ++++---- cpp/src/Slice/PythonUtil.cpp | 10 ++++++++++ cpp/src/slice2cpp/Main.cpp | 6 +++--- 4 files changed, 19 insertions(+), 10 deletions(-) (limited to 'cpp/include/Slice/Preprocessor.h') diff --git a/cpp/include/Slice/Preprocessor.h b/cpp/include/Slice/Preprocessor.h index c1b6c806e5f..23458bccfbb 100644 --- a/cpp/include/Slice/Preprocessor.h +++ b/cpp/include/Slice/Preprocessor.h @@ -32,7 +32,7 @@ class SLICE_API Preprocessor { public: - Preprocessor(const std::string&, const std::string&, const std::vector&, const std::string& = "cpp"); + Preprocessor(const std::string&, const std::string&, const std::vector&); ~Preprocessor(); FILE* preprocess(bool); @@ -40,7 +40,7 @@ public: enum Language { CPlusPlus, Java, JavaXML, CSharp, VisualBasic }; - bool printMakefileDependencies(Language, const std::vector&); + bool printMakefileDependencies(Language, const std::vector&, const std::string& = "cpp"); std::string getBaseName(); @@ -54,7 +54,6 @@ private: const std::string _path; const std::string _fileName; const std::vector _args; - const std::string _cppSourceExt; #ifdef _WIN32 std::wstring _cppFile; #else diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 95432a9cee7..29c968f9f93 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -44,11 +44,10 @@ extern "C" int mcpp_lib_main(int argc, char** argv); extern "C" void mcpp_use_mem_buffers(int tf); extern "C" char* mcpp_get_mem_buffer(Outdest od); -Slice::Preprocessor::Preprocessor(const string& path, const string& fileName, const vector& args, const string& cppSourceExt) : +Slice::Preprocessor::Preprocessor(const string& path, const string& fileName, const vector& args) : _path(path), _fileName(fileName), _args(args), - _cppSourceExt(cppSourceExt), _cppHandle(0) { } @@ -223,7 +222,8 @@ Slice::Preprocessor::preprocess(bool keepComments) } bool -Slice::Preprocessor::printMakefileDependencies(Language lang, const vector& includePaths) +Slice::Preprocessor::printMakefileDependencies(Language lang, const vector& includePaths, + const string& cppSourceExt) { if(!checkInputFile()) { @@ -426,7 +426,7 @@ Slice::Preprocessor::printMakefileDependencies(Language lang, const vector paths = includePaths; diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index edc05acd543..7e42a5ab96a 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -170,15 +170,15 @@ main(int argc, char* argv[]) { if(depend) { - Preprocessor icecpp(argv[0], *i, cppArgs, sourceExtension); - if(!icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths)) + Preprocessor icecpp(argv[0], *i, cppArgs); + if(!icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths, sourceExtension)) { return EXIT_FAILURE; } } else { - Preprocessor icecpp(argv[0], *i, cppArgs, sourceExtension); + Preprocessor icecpp(argv[0], *i, cppArgs); FILE* cppHandle = icecpp.preprocess(false); if(cppHandle == 0) -- cgit v1.2.3