You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by br...@apache.org on 2009/03/20 02:51:17 UTC
svn commit: r756295 -
/incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
Author: bryanduxbury
Date: Fri Mar 20 01:51:16 2009
New Revision: 756295
URL: http://svn.apache.org/viewvc?rev=756295&view=rev
Log:
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.
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc?rev=756295&r1=756294&r2=756295&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc Fri Mar 20 01:51:16 2009
@@ -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 << "}";
}