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

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_r55930387
  
    --- 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 */
    -                                  1048576, /* max, 1024*1024 */
    -                                  512, /* default value */
    +                                  G_MAXUINT32, /* max, 1024*1024 */
    --- End diff --
    
    Sorry about that, 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