commit | afa1b47e60c4ffba554f6187d84fd20cd514f51d | [log] [tgz] |
---|---|---|
author | Bryan Duxbury <bryanduxbury@apache.org> | 周五 3月 20 01:51:16 2009 +0000 |
committer | Bryan Duxbury <bryanduxbury@apache.org> | 周五 3月 20 01:51:16 2009 +0000 |
tree | bd439a4520833ae34ecaf12d410c6dd98ae67323 | |
parent | ae0631a844968eefd10aa00863b0c26fc1f54b83 [diff] |
THRIFT-245. rb: FIELDS constant should contain name of enumerated type for enum fields This patch adds the :enum_class key to FIELDS entries that are enums. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@756295 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_rb_generator.cc b/compiler/cpp/src/generate/t_rb_generator.cc index 9385282..3169556 100644 --- a/compiler/cpp/src/generate/t_rb_generator.cc +++ b/compiler/cpp/src/generate/t_rb_generator.cc
@@ -592,6 +592,10 @@ out << ", :optional => true"; } + if (field_type->is_enum()) { + out << ", :enum_class => " << full_type_name(field_type); + } + // End of this field's defn out << "}"; }