/[Apache-SVN]
ViewVC logotype

Revision 665502


Jump to revision: Previous Next
Author: dreiss
Date: Tue Feb 26 06:40:22 2008 UTC (16 years, 8 months ago)
Changed paths: 2
Log Message:
Move Ruby fielded object creation from generated constructor to ThriftStruct

Rather than the generated code needing to handle simple fielded
creation of objects, the ThriftStruct module constructor is extended to
handle hash arguments. Statements such as

  o = ThriftObject.new :field1 => value1, :field2 => value2, ...

are supported as before, and the string form,

  o = ThriftObject.new "field1" => value1, "field2" => value2, ...

disabled by the previous patch now also works.

Placing this code in the module is also just a cleaner solution.


Changed paths

Path Details
Directoryincubator/thrift/trunk/compiler/cpp/src/generate/t_rb_generator.cc modified , text changed
Directoryincubator/thrift/trunk/lib/rb/lib/thrift/thrift.rb modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26