[ 
https://issues.apache.org/jira/browse/THRIFT-2980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15192038#comment-15192038
 ] 

ASF GitHub Bot commented on THRIFT-2980:
----------------------------------------

Github user cjmay commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/821#discussion_r55930384
  
    --- Diff: lib/c_glib/src/thrift/c_glib/transport/thrift_memory_buffer.c ---
    @@ -209,16 +242,39 @@ thrift_memory_buffer_class_init 
(ThriftMemoryBufferClass *cls)
     
       param_spec = g_param_spec_uint ("buf_size",
                                       "buffer size (construct)",
    -                                  "Set the read buffer size",
    +                                  "Set the read/write buffer size limit"
    +                                  " (0 for unlimited)",
                                       0, /* min */
    --- End diff --
    
    That was my original intent, but now that you mention it I realize there's 
not actually an improvement over the size type (currently uint32) max.  Fixed.


> ThriftMemoryBuffer doesn't have a constructor option to take an existing 
> buffer
> -------------------------------------------------------------------------------
>
>                 Key: THRIFT-2980
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2980
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C glib - Library
>            Reporter: Eugene Tolmachev
>            Assignee: Simon South
>
> If I want to do a straight-up serialization/deserialization sans RPC I'd like 
> to be able to read like this C# does:
> bq. Item Deserialize(byte[] bytes) {  using (var trans = new 
> TMemoryBuffer(bytes)) using (var proto = new TBinaryProtocol(trans)) return 
> new Item().Do(item => item.Read(proto)); }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to