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

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

GitHub user jeremy-w opened a pull request:

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

    THRIFT-2987: returns message/struct/field names directly

    Returning byref was triggering a warning from ARC.

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

    $ git pull https://github.com/jeremy-w/thrift 
directly-returns-names-THRIFT-2987

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

    https://github.com/apache/thrift/pull/387.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 #387
    
----
commit 5acd8dd77dfcdf6f8f723bb6459d1a58d878b22c
Author: Jeremy W. Sherman <jeremyw.sher...@gmail.com>
Date:   2015-03-04T04:20:15Z

    THRIFT-2987: returns message/struct/field names directly
    
    Returning byref was triggering a warning from ARC.

----


> TProtocol should return NSString directly rather than by reference to appease 
> ARC
> ---------------------------------------------------------------------------------
>
>                 Key: THRIFT-2987
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2987
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Cocoa - Library
>            Reporter: Jeremy W. Sherman
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> As currently written, the compiler gripes like so:
> {code}
> thrift/lib/cocoa/src/protocol/TBinaryProtocol.m:161:55: warning: method 
> parameter of type 'NSString *__autoreleasing *' with no explicit ownership 
> [-Wexplicit-ownership-type]
> - (void) readMessageBeginReturningName: (NSString **) name
>                                                       ^
> {code}
> Annotating for ownership might make non-ARC builds unhappy, but since there 
> is only one object being returned by reference, this and similar methods can 
> just be changed to return the name directly.



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

Reply via email to