Make the C++ generator use non-hardcoded namespaces.
- Make the C++ generator use program->get_namespace("cpp")
instead of program->get_cpp_namespace()
- Eliminate the explicit "cpp_namespace" in t_program.
- Deprecate the cpp_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665513 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ConstantsDemo.thrift b/test/ConstantsDemo.thrift
index 8cc6a1f..0b9d839 100644
--- a/test/ConstantsDemo.thrift
+++ b/test/ConstantsDemo.thrift
@@ -1,4 +1,4 @@
-cpp_namespace yozone
+namespace cpp yozone
struct thing {
1: i32 hello,
diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift
index bd13d44..cdbea2a 100644
--- a/test/DebugProtoTest.thrift
+++ b/test/DebugProtoTest.thrift
@@ -1,4 +1,4 @@
-cpp_namespace thrift.test
+namespace cpp thrift.test
struct Doubles {
1: double nan,
diff --git a/test/DenseLinkingTest.thrift b/test/DenseLinkingTest.thrift
index 9414bd5..787c501 100644
--- a/test/DenseLinkingTest.thrift
+++ b/test/DenseLinkingTest.thrift
@@ -14,7 +14,7 @@
then compiling this should give errors because of doubly defined symbols.
*/
-cpp_namespace thrift.test
+namespace cpp thrift.test
struct OneOfEachZZ {
1: bool im_true,
diff --git a/test/DocTest.thrift b/test/DocTest.thrift
index 5749fda..d760d9e 100755
--- a/test/DocTest.thrift
+++ b/test/DocTest.thrift
@@ -5,7 +5,7 @@
*/
java_package thrift.test
-cpp_namespace thrift.test
+namespace cpp thrift.test
// C++ comment
/* c style comment */
diff --git a/test/OptionalRequiredTest.thrift b/test/OptionalRequiredTest.thrift
index 42e7879..a635813 100644
--- a/test/OptionalRequiredTest.thrift
+++ b/test/OptionalRequiredTest.thrift
@@ -1,4 +1,4 @@
-cpp_namespace thrift.test
+namespace cpp thrift.test
struct OldSchool {
1: i16 im_int;
diff --git a/test/StressTest.thrift b/test/StressTest.thrift
index 1b2b7c8..f23aa00 100644
--- a/test/StressTest.thrift
+++ b/test/StressTest.thrift
@@ -1,4 +1,4 @@
-cpp_namespace test.stress
+namespace cpp test.stress
service Service {
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index a549fa7..6339f4d 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -1,5 +1,5 @@
java_package thrift.test
-cpp_namespace thrift.test
+namespace cpp thrift.test
ruby_namespace Thrift.Test
perl_package ThriftTest
csharp_namespace Thrift.Test
@@ -119,4 +119,4 @@
10: map<i32, i32> newmap,
11: string newstring,
12: i32 end_in_both
-}
\ No newline at end of file
+}