mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 18:58:51 +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,13 +329,16 @@ 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 = "") {
|
||||
field_type = get_true_type(field_type);
|
||||
|
||||
// Begin this field's defn
|
||||
out << "{:type => " << type_to_enum(field_type);
|
||||
|
||||
if (!field_name.empty())
|
||||
if (!field_name.empty()) {
|
||||
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()) {
|
||||
out << ", :class => " << type_name(((t_struct*)field_type));
|
||||
} else if (field_type->is_list()) {
|
||||
|
Loading…
Reference in New Issue
Block a user