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/09/09 04:46:46 UTC

[lucy-issues] [jira] [Commented] (CLOWNFISH-59) Refine Go bindings

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

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

GitHub user rectang opened a pull request:

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

    CLOWNFISH-59 Go nil check

    Nil checking Go interface types can be subtle:
    
    * http://play.golang.org/p/-pjThjJfxr
    * http://golang.org/doc/faq#nil_error
    
    The branch corrects nil-checking mistakes and continues tightening up the Go/Clownfish glue code.

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

    $ git pull https://github.com/rectang/lucy-clownfish CLOWNFISH-59-nil-check

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

    https://github.com/apache/lucy-clownfish/pull/37.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 #37
    
----
commit 029d9786233e56d9f3c75d70b7b8bf5cb8e67096
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-20T01:50:41Z

    Don't export certain conversion helpers.
    
    Export `GoToClownfish`, but not `goToString`, `goToHash`, etc.

commit 699a22b58c26729eb8bcea2c8c2d625fc8f9ba0c
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-20T02:10:00Z

    Compress duplicate cases in type switch.

commit 7988b5ffd869afe613ab7becc3805a219b2f5c2f
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-28T02:39:19Z

    Introduce `Unwrap`, `UnwrapNullable`.
    
    Replace `UnwrapClownfish` with new functions that perform valid
    nil-checking.  For nullable parameters, perform better error checking in
    Go in order to throw better errors.

commit 180d963b64cba359cb55b44dbe49613e4dc2a76d
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-29T01:11:13Z

    Improve quoting in test messages.

commit bd9f043b3a4ba006cc407b4a414827a2879e0b1f
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-29T01:49:34Z

    Perform nil-checking on concrete types.
    
    Nil-checking on interface types only returns true if both the type and
    value slots in the interface tuple are 0.  Therefore, it is necessary to
    push nil-checking down into code which knows the concrete type.

commit b0049db2a1c0c4c8046855bd18075961f33b0f13
Author: Marvin Humphrey <ma...@rectangular.com>
Date:   2015-08-29T02:25:24Z

    Fix refcounting error in Go arg conversion.
    
    Fix reversed logic for applying decrefs.
    
    *   If the arg is decremented but only unwrapped, add a decref.
    *   If the arg is not decremented but is converted using GoToClownfish
        (which returns an incremented value), add a decref.
    
    Then, remove the spurious extra incref in GoToClownfish (a memory leak
    in many cases) which had balanced out the extra decref.

----


> Refine Go bindings
> ------------------
>
>                 Key: CLOWNFISH-59
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-59
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>          Components: Go
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>             Fix For: 0.5.0
>
>
> The autogenerated Go bindings are usually good, but in some cases should be overridden. We also need tests for the Go bindings. 



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