mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-08 03:08:53 +00:00
Add get_true_type call to RB generator
Summary: Issue with typedefs failing, submitted by kevin clark @ powerset Reviewed By: mcslee git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d779cbe48c
commit
f150f1aed5
@ -329,11 +329,14 @@ void t_rb_generator::generate_field_defns(std::ofstream& out, t_struct* tstruct)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void t_rb_generator::generate_field_data(std::ofstream& out, t_type* field_type, const std::string& field_name = "") {
|
void t_rb_generator::generate_field_data(std::ofstream& out, t_type* field_type, const std::string& field_name = "") {
|
||||||
|
field_type = get_true_type(field_type);
|
||||||
|
|
||||||
// Begin this field's defn
|
// Begin this field's defn
|
||||||
out << "{:type => " << type_to_enum(field_type);
|
out << "{:type => " << type_to_enum(field_type);
|
||||||
|
|
||||||
if (!field_name.empty())
|
if (!field_name.empty()) {
|
||||||
out << ", :name => '" << field_name << "'";
|
out << ", :name => '" << field_name << "'";
|
||||||
|
}
|
||||||
|
|
||||||
if (!field_type->is_base_type()) {
|
if (!field_type->is_base_type()) {
|
||||||
if (field_type->is_struct() || field_type->is_xception()) {
|
if (field_type->is_struct() || field_type->is_xception()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user