Make the Ruby generator use non-hardcoded namespaces.
- Make the Ruby generator use program->get_namespace("ruby")
instead of program->get_ruby_namespace()
- Eliminate the explicit "ruby_namespace" in t_program.
- Deprecate the ruby_namespace token.
- Update example .thrift files and syntax files.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665620 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
index 53c6d81..d555f53 100644
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -293,11 +293,13 @@
g_program->set_perl_package($2);
}
}
+/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */
| tok_ruby_namespace tok_identifier
{
+ pwarning(1, "'ruby_namespace' is deprecated. Use 'namespace rb' instead");
pdebug("Header -> tok_ruby_namespace tok_identifier");
if (g_parse_mode == PROGRAM) {
- g_program->set_ruby_namespace($2);
+ g_program->set_namespace("rb", $2);
}
}
/* TODO(dreiss): Get rid of this once everyone is using the new hotness. */