Hi Chandranshu, Would you mind posting this to https://issues.apache.org/jira/browse/THRIFT ? You may need to create an account in JIRA. It's the standard way of accepting patches, and it lets you check the box giving rights to the ASF, which we need in order to push. We can discuss your patch there.
Thanks! On Sun, Dec 7, 2008 at 11:37 AM, Chandranshu . <[EMAIL PROTECTED]> wrote: > Hi, > > I was working to get another facebook framework named Scribe to work > with Ruby. As it uses Thrift, I had to set it up. I'm not aware of the > procedure of creating issues and submitting patches. So, I'm putting > the code here itself. > > The sample code for Scribe used TBinaryProtocol in Python whose > equivalent is Thrift::BinaryProtocol in Ruby. The method > read_message_begin is quite old as compared to its python counterpart. > I have changed it to be similar to the Python version as listed below. > Please note that this code does not check for a strict read condition > that was used by Python to restrict the actions in the else clause. > > def read_message_begin > version = read_i32 > if(version <0) > if (version & VERSION_MASK != VERSION_1) > raise ProtocolException.new(ProtocolException::BAD_VERSION, > 'Missing version identifier') > end > type = version & 0×000000ff > name = read_string > seqid = read_i32 > else > name = trans.readAll(version) > type = read_byte > seqid = read_i32 > end > [name, type, seqid] > end > > Please review and commit it to the codebase. > > Regards > Chandranshu > -- Kevin Clark http://glu.ttono.us
