summaryrefslogtreecommitdiff
path: root/cpp/rubygen/framing.0-10/structs.rb
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-07-04 13:14:06 +0000
committerGordon Sim <gsim@apache.org>2008-07-04 13:14:06 +0000
commitb30bd3079da06193dc3e4a8e53234c9bbca987bc (patch)
treed48573909939c61dbf994b933721d1850af55cb5 /cpp/rubygen/framing.0-10/structs.rb
parent2988a3f52390f8c0715e0fb9e7256606d1adb8bb (diff)
downloadqpid-python-b30bd3079da06193dc3e4a8e53234c9bbca987bc.tar.gz
Allow default values for packed structs to be overridden (currently used for message.transfer.accept-mode)
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@674040 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/rubygen/framing.0-10/structs.rb')
-rw-r--r--cpp/rubygen/framing.0-10/structs.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/rubygen/framing.0-10/structs.rb b/cpp/rubygen/framing.0-10/structs.rb
index e97b6311a2..e4d57ca75d 100644
--- a/cpp/rubygen/framing.0-10/structs.rb
+++ b/cpp/rubygen/framing.0-10/structs.rb
@@ -48,7 +48,7 @@ class StructGen < CppGen
def default_initialisation(s)
params = s.fields.select {|f| ValueTypes.include?(f.cpptype.name) || (!is_packed(s) && f.type_ == "bit")}
- strings = params.collect {|f| "#{f.cppname}(0)"}
+ strings = params.collect {|f| "#{f.cppname}(#{f.default_value})"}
strings << "flags(0)" if (is_packed(s))
if strings.empty?
return ""