Return-Path: X-Original-To: apmail-lucy-dev-archive@www.apache.org Delivered-To: apmail-lucy-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BB2F317670 for ; Wed, 9 Sep 2015 02:46:15 +0000 (UTC) Received: (qmail 30757 invoked by uid 500); 9 Sep 2015 02:46:15 -0000 Delivered-To: apmail-lucy-dev-archive@lucy.apache.org Received: (qmail 30709 invoked by uid 500); 9 Sep 2015 02:46:15 -0000 Mailing-List: contact dev-help@lucy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucy.apache.org Delivered-To: mailing list dev@lucy.apache.org Received: (qmail 30695 invoked by uid 99); 9 Sep 2015 02:46:15 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Sep 2015 02:46:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3C4F8DFC8E; Wed, 9 Sep 2015 02:46:15 +0000 (UTC) From: rectang To: dev@lucy.apache.org Reply-To: dev@lucy.apache.org Message-ID: Content-Type: text/plain Date: Wed, 9 Sep 2015 02:46:15 +0000 (UTC) Subject: [lucy-dev] [GitHub] lucy-clownfish pull request: CLOWNFISH-59 Go nil check 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 Date: 2015-08-20T01:50:41Z Don't export certain conversion helpers. Export `GoToClownfish`, but not `goToString`, `goToHash`, etc. commit 699a22b58c26729eb8bcea2c8c2d625fc8f9ba0c Author: Marvin Humphrey Date: 2015-08-20T02:10:00Z Compress duplicate cases in type switch. commit 7988b5ffd869afe613ab7becc3805a219b2f5c2f Author: Marvin Humphrey 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 Date: 2015-08-29T01:11:13Z Improve quoting in test messages. commit bd9f043b3a4ba006cc407b4a414827a2879e0b1f Author: Marvin Humphrey 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 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. ---