summaryrefslogtreecommitdiff
path: root/cpp/rubygen/templates/structs.rb
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/rubygen/templates/structs.rb')
-rw-r--r--cpp/rubygen/templates/structs.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/rubygen/templates/structs.rb b/cpp/rubygen/templates/structs.rb
index 363fe4ec35..69405f05f5 100644
--- a/cpp/rubygen/templates/structs.rb
+++ b/cpp/rubygen/templates/structs.rb
@@ -152,6 +152,9 @@ EOS
def define_accessors(f)
genl "void set#{f.name.caps}(#{f.cpptype.param} _#{f.cppname}) { #{f.cppname} = _#{f.cppname}; }"
genl "#{f.cpptype.ret} get#{f.name.caps}() const { return #{f.cppname}; }"
+ if (f.cpptype.name == "FieldTable")
+ genl "#{f.cpptype.name}& get#{f.name.caps}() { return #{f.cppname}; }"
+ end
end
def define_struct(s)