You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/05/29 03:25:18 UTC

[lucy-issues] [jira] [Commented] (CLOWNFISH-51) Go glue should convert clownfish.String to Go string

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

ASF GitHub Bot commented on CLOWNFISH-51:
-----------------------------------------

GitHub user rectang opened a pull request:

    https://github.com/apache/lucy-clownfish/pull/24

    CLOWNFISH-51 Go string conversion

    Clownfish methods which are bound to Go should accept Go strings as arguments and return Go strings, rather than requiring the user to convert string types.
    
    Go's memory model doesn't allow for sharing string data, so we can't use stack-allocated string wrappers as we have in the Perl bindings and each conversion will involve allocating a full new copy. At least the copies are guaranteed to be cleaned up by the Go garbage collector, though. 

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

    $ git pull https://github.com/rectang/lucy-clownfish CLOWNFISH-51-go-string-conv

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

    https://github.com/apache/lucy-clownfish/pull/24.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 #24
    
----
commit e655dc21086e1d0cd00b7bf391ab02f61e01e603
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-22T23:30:57Z

    Break out Go return statement code gen.

commit 83881f0f1abd357afeee364ee2042218a607e894
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-23T01:44:45Z

    Add Go built-in types to list of reserved words.

commit 69b35c3e7ba1c3b93e47c62ac7a0d51656086b5c
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-28T17:55:12Z

    Add helper identifying Clownfish runtime parcel.

commit ba550db5546412b391ea4fe413cac355e5627a1b
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-28T17:59:25Z

    Be more strict about what is a "string type".

commit 9da720363a68aad40b62bafcd4e8b843c3384a21
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-23T01:47:02Z

    Convert Clownfish/Go string types in glue.
    
    Convert Clownfish Strings to Go strings and vice versa when crossing the
    Go/C border.

commit 0fdbd3daef0e1d1534cab9487a31866341acd809
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-23T02:17:50Z

    Add tests for Go bindings of clownfish.String.

commit 4028a4d4fb37a9ca15592f6e6bb2399f3050fc8e
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-05-23T23:01:02Z

    Custom Go bindings for some String methods.
    
    Map C int32_t to Go rune when representing Unicode code points.

----


> Go glue should convert clownfish.String to Go string
> ----------------------------------------------------
>
>                 Key: CLOWNFISH-51
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-51
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>          Components: Go
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>             Fix For: 0.5.0
>
>
> Clownfish methods which are bound to go should accept Go strings as arguments and return Go strings, rather than requiring the user to convert string types.



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