From: Bryan Duxbury Date: Fri, 20 Mar 2009 01:51:16 +0000 (+0000) Subject: THRIFT-245. rb: FIELDS constant should contain name of enumerated type for enum fields X-Git-Tag: 0.2.0~252 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=afa1b47e60c4ffba554f6187d84fd20cd514f51d;p=common%2Fthrift.git 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 93852821..3169556f 100644 --- a/compiler/cpp/src/generate/t_rb_generator.cc +++ b/compiler/cpp/src/generate/t_rb_generator.cc @@ -592,6 +592,10 @@ void t_rb_generator::generate_field_data(std::ofstream& out, t_type* field_type, out << ", :optional => true"; } + if (field_type->is_enum()) { + out << ", :enum_class => " << full_type_name(field_type); + } + // End of this field's defn out << "}"; }