--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 69082431FAF\r
+ for <notmuch@notmuchmail.org>; Tue, 8 May 2012 13:13:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id S1fK85hwqvwY for <notmuch@notmuchmail.org>;\r
+ Tue, 8 May 2012 13:13:34 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru-group.fi [87.108.86.66])\r
+ by olra.theworths.org (Postfix) with ESMTP id EC952431FAE\r
+ for <notmuch@notmuchmail.org>; Tue, 8 May 2012 13:13:33 -0700 (PDT)\r
+Received: by guru.guru-group.fi (Postfix, from userid 501)\r
+ id 2DE6868021; Tue, 8 May 2012 23:13:28 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Charlie Allom <charlie@mediasp.com>, notmuch@notmuchmail.org,\r
+ Ali Polatel <alip@exherbo.org>\r
+Subject: Re: [PATCH] ruby: extern values in ruby defs.h\r
+In-Reply-To: <1336481467-66356-1-git-send-email-charlie@mediasp.com>\r
+References: <1336481467-66356-1-git-send-email-charlie@mediasp.com>\r
+User-Agent: Notmuch/0.12+181~g650dcc2 (http://notmuchmail.org) Emacs/23.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Tue, 08 May 2012 23:13:28 +0300\r
+Message-ID: <m262c6ctxz.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 08 May 2012 20:13:35 -0000\r
+\r
+On Tue, May 08 2012, Charlie Allom <charlie@mediasp.com> wrote:\r
+\r
+> Currently, building on OSX complains about linking duplicate symbols. This\r
+> fixes the error.\r
+> ---\r
+\r
+I just spent some time looking out this declaration/definition thing --\r
+it is not easy to find proper documentation...\r
+\r
+Finally, I was reading this:\r
+\r
+http://www.open-std.org/jtc1/sc22/wg14/www/docs/C99RationaleV5.10.pdf\r
+\r
+(warning (goatse class), pdf converted from word document ;)\r
+\r
+At the end of page 33 is interesting (also beginning of 34 and it is good\r
+to start from middle of page 32)\r
+\r
+Those mention 4 different way 'external linkage' is handled in pre-89\r
+compilers...\r
+\r
+Standards-compliant (c99, at least) compilers should handle this is \r
+a combination of 'Strict Ref/Def' and 'Initialization' model. IIUC this\r
+means that if variable is defined (I mean declared) as\r
+\r
+int i;\r
+\r
+It is a tentative definition; There can be many of these seen by c compiler\r
+while compiling c files and when linking is done there will be one storage\r
+allocated for this variable. There can be (at most) one definition like\r
+\r
+int i = 0; \r
+\r
+in source code, even another 'int i = 0;' is not allowed according to\r
+the standard -- some compilers may make this work (and even the case where\r
+there is 'int i = 1;')\r
+\r
+But, there are also compilers that only allow 'Strict Ref/Def' model; IIUC\r
+then there can be only one 'int i;' (or 'int i = 0;') -- and all others\r
+(declarations) needs to be in format 'extern int i;'. The 'Strict Ref/Def'\r
+model is the model specified in K&R.\r
+\r
+All of that said, LGTM!\r
+\r
+Tomi\r
+\r
+> bindings/ruby/defs.h | 46 +++++++++++++++++++++++-----------------------\r
+> 1 files changed, 23 insertions(+), 23 deletions(-)\r
+>\r
+> diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h\r
+> index 81f652f..bd124cc 100644\r
+> --- a/bindings/ruby/defs.h\r
+> +++ b/bindings/ruby/defs.h\r
+> @@ -24,31 +24,31 @@\r
+> #include <notmuch.h>\r
+> #include <ruby.h>\r
+>\r
+> -VALUE notmuch_rb_cDatabase;\r
+> -VALUE notmuch_rb_cDirectory;\r
+> -VALUE notmuch_rb_cFileNames;\r
+> -VALUE notmuch_rb_cQuery;\r
+> -VALUE notmuch_rb_cThreads;\r
+> -VALUE notmuch_rb_cThread;\r
+> -VALUE notmuch_rb_cMessages;\r
+> -VALUE notmuch_rb_cMessage;\r
+> -VALUE notmuch_rb_cTags;\r
+> -\r
+> -VALUE notmuch_rb_eBaseError;\r
+> -VALUE notmuch_rb_eDatabaseError;\r
+> -VALUE notmuch_rb_eMemoryError;\r
+> -VALUE notmuch_rb_eReadOnlyError;\r
+> -VALUE notmuch_rb_eXapianError;\r
+> -VALUE notmuch_rb_eFileError;\r
+> -VALUE notmuch_rb_eFileNotEmailError;\r
+> -VALUE notmuch_rb_eNullPointerError;\r
+> -VALUE notmuch_rb_eTagTooLongError;\r
+> -VALUE notmuch_rb_eUnbalancedFreezeThawError;\r
+> -VALUE notmuch_rb_eUnbalancedAtomicError;\r
+> -\r
+> -ID ID_call;\r
+> -ID ID_db_create;\r
+> -ID ID_db_mode;\r
+> +extern VALUE notmuch_rb_cDatabase;\r
+> +extern VALUE notmuch_rb_cDirectory;\r
+> +extern VALUE notmuch_rb_cFileNames;\r
+> +extern VALUE notmuch_rb_cQuery;\r
+> +extern VALUE notmuch_rb_cThreads;\r
+> +extern VALUE notmuch_rb_cThread;\r
+> +extern VALUE notmuch_rb_cMessages;\r
+> +extern VALUE notmuch_rb_cMessage;\r
+> +extern VALUE notmuch_rb_cTags;\r
+> +\r
+> +extern VALUE notmuch_rb_eBaseError;\r
+> +extern VALUE notmuch_rb_eDatabaseError;\r
+> +extern VALUE notmuch_rb_eMemoryError;\r
+> +extern VALUE notmuch_rb_eReadOnlyError;\r
+> +extern VALUE notmuch_rb_eXapianError;\r
+> +extern VALUE notmuch_rb_eFileError;\r
+> +extern VALUE notmuch_rb_eFileNotEmailError;\r
+> +extern VALUE notmuch_rb_eNullPointerError;\r
+> +extern VALUE notmuch_rb_eTagTooLongError;\r
+> +extern VALUE notmuch_rb_eUnbalancedFreezeThawError;\r
+> +extern VALUE notmuch_rb_eUnbalancedAtomicError;\r
+> +\r
+> +extern ID ID_call;\r
+> +extern ID ID_db_create;\r
+> +extern ID ID_db_mode;\r
+>\r
+> /* RSTRING_PTR() is new in ruby-1.9 */\r
+> #if !defined(RSTRING_PTR)\r
+> --\r
+> 1.7.5.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r