lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rectang <...@git.apache.org>
Subject [lucy-dev] [GitHub] lucy-clownfish pull request: CLOWNFISH-59 Go nil check
Date Wed, 09 Sep 2015 02:46:15 GMT
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 <marvin@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 <marvin@rectangular.com>
Date:   2015-08-20T02:10:00Z

    Compress duplicate cases in type switch.

commit 7988b5ffd869afe613ab7becc3805a219b2f5c2f
Author: Marvin Humphrey <marvin@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 <marvin@rectangular.com>
Date:   2015-08-29T01:11:13Z

    Improve quoting in test messages.

commit bd9f043b3a4ba006cc407b4a414827a2879e0b1f
Author: Marvin Humphrey <marvin@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 <marvin@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.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message