Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id B5AAB431FAF for ; Thu, 5 Mar 2015 23:23:12 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.438 X-Spam-Level: ** X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UrS2OQyw1yKf for ; Thu, 5 Mar 2015 23:23:09 -0800 (PST) Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net [87.98.215.224]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 72132431FAE for ; Thu, 5 Mar 2015 23:23:09 -0800 (PST) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YTmZF-0006HR-Vg; Fri, 06 Mar 2015 07:21:05 +0000 Received: (nullmailer pid 28867 invoked by uid 1000); Fri, 06 Mar 2015 07:20:52 -0000 From: David Bremner To: Trevor Jim , Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH] go: add binding for notmuch_message_get_date In-Reply-To: References: <87385mmasu.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.19+67~gdbe9924 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 06 Mar 2015 08:20:52 +0100 Message-ID: <87wq2ua8x7.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2015 07:23:12 -0000 Trevor Jim writes: > I'm not sure what the "current troubles" are (happy to hear more), but > the way I've handled the nil case is in keeping with the way it's > handled in the other function bindings for go. Adding an error return > to all relevant functions seems like a big change that should be handled > separately, yes? It seems like at least some functions [1] already use multiple return values to return a status value. There is also already a STATUS_NULL_POINTER defined. [1]: from notmuch.go func NewDatabase(path string) (*Database, Status) { func OpenDatabase(path string, mode DatabaseMode) (*Database, Status) { func (self *Database) Close() Status { func (self *Database) GetDirectory(path string) (*Directory, Status) { func (self *Database) AddMessage(fname string) (*Message, Status) { func (self *Database) RemoveMessage(fname string) Status { func (self *Database) FindMessage(message_id string) (*Message, Status) { func (self *Message) AddTag(tag string) Status { func (self *Message) RemoveTag(tag string) Status { func (self *Message) RemoveAllTags() Status { func (self *Message) Freeze() Status { func (self *Message) Thaw() Status {