GitHub user cjmay opened a pull request:

    https://github.com/apache/thrift/pull/821

    THRIFT-2980 Accept external buffer in thrift_memory_buffer constructor

    Here's a pass at letting thrift_memory_buffer take its buffer as a 
constructor argument:
    
    Add buf (GByteArray pointer) and owner (gboolean) to constructor-only 
properties.  Create buf (object member) during construction if buf 
(constructor-only property) is NULL, the default.  Unref buf during finalize if 
buf is non-NULL and owner is TRUE.
    
    Also change semantics of buf_size slightly: default is now zero, max is 
G_MAXUINT32, and zero is interpreted as no limit.  (My thrift objects are often 
very large; setting no limit as the default seems to simplify the usage in my 
opinion, and I believe raising the maximum is harmless.)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cjmay/thrift THRIFT-2980

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/thrift/pull/821.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #821
    
----
commit 939f66c638f68eb811bf22e4cb1a1a13fc2871cd
Author: Chandler May <cjmay4...@gmail.com>
Date:   2016-01-24T03:27:27Z

    THRIFT-2980 Accept external buffer in thrift_memory_buffer constructor

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to