1 Return-Path: <polatel@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 2A26A431FBC
\r
6 for <notmuch@notmuchmail.org>; Sun, 24 Jun 2012 15:21:06 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id U3pNJ6S3YG6y for <notmuch@notmuchmail.org>;
\r
17 Sun, 24 Jun 2012 15:21:05 -0700 (PDT)
\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
19 [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 2DEE2431FAE
\r
22 for <notmuch@notmuchmail.org>; Sun, 24 Jun 2012 15:21:05 -0700 (PDT)
\r
23 Received: by lbbgk8 with SMTP id gk8so5814283lbb.26
\r
24 for <notmuch@notmuchmail.org>; Sun, 24 Jun 2012 15:21:03 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=mime-version:in-reply-to:references:from:date:message-id:subject:to
\r
27 :cc:content-type:content-transfer-encoding;
\r
28 bh=vRR9ESNUHAnDWDLSsLz5ecgU0QHJsD57VSS5bariBLM=;
\r
29 b=rJQnbdBhd+8DYog/28GigUi0ZGCw9nCoT4NSZkagx9E54lTbCAOcfI2p7lH3cCifkQ
\r
30 lzLxIxAuExilL1WCp7VV10DBt/9yfXF6bmgejTAURurVGtP6xF7aCPUYhH3rUIYiokN6
\r
31 92RCiGVJ2ah8+mQ7buF9VTnDsMlRqmUHt2GhMHxqOfqJetFUCz62VmCz6R2prFPutsQp
\r
32 CChtLeocN+f14YF1fvpKPPP8YIe1bdMey3assNK08obW7JGgstqfp7EcU8R6eppEnvuI
\r
33 5X67yM8xn8INojS47Lf67k7AZJHl9D3d08aR2Kv3wiA6Fm/KKlwtkWCEYykZAJMFG0m0
\r
35 Received: by 10.152.147.33 with SMTP id th1mr9995760lab.9.1340576463491; Sun,
\r
36 24 Jun 2012 15:21:03 -0700 (PDT)
\r
38 Received: by 10.112.87.134 with HTTP; Sun, 24 Jun 2012 15:20:43 -0700 (PDT)
\r
39 In-Reply-To: <1340563714-3103-1-git-send-email-tomi.ollila@iki.fi>
\r
40 References: <1340563714-3103-1-git-send-email-tomi.ollila@iki.fi>
\r
41 From: Ali Polatel <polatel@gmail.com>
\r
42 Date: Mon, 25 Jun 2012 01:20:43 +0300
\r
44 <CADv3eywhB6QGu+BXQ=azSrCUZF4u_3wyUU2RvJ42Y5MZBVWoEQ@mail.gmail.com>
\r
45 Subject: Re: [PATCH v2] ruby: extern linkage portability improvement
\r
46 To: Tomi Ollila <tomi.ollila@iki.fi>
\r
47 Content-Type: text/plain; charset=ISO-8859-1
\r
48 Content-Transfer-Encoding: quoted-printable
\r
49 Cc: notmuch@notmuchmail.org
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Sun, 24 Jun 2012 22:21:06 -0000
\r
64 2012/6/24 Tomi Ollila <tomi.ollila@iki.fi>:
\r
65 > Some C compilers are stricter when it comes to (tentative) definition
\r
66 > of a variable -- in those compilers introducing variable without 'extern'
\r
67 > keyword always allocates new 'storage' to the variable and linking all
\r
68 > these modules fails due to duplicate symbols.
\r
70 > This is reimplementation of Charlie Allom's patch:
\r
71 > id:"1336481467-66356-1-git-send-email-charlie@mediasp.com",
\r
72 > written originally by Ali Polatel. This version has
\r
73 > more accurate commit message.
\r
75 > =A0bindings/ruby/defs.h | =A0 46 +++++++++++++++++++++++-----------------=
\r
77 > =A0bindings/ruby/init.c | =A0 26 ++++++++++++++++++++++++++
\r
78 > =A02 files changed, 49 insertions(+), 23 deletions(-)
\r
80 > diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
\r
81 > index 3f9512b..fe81b3f 100644
\r
82 > --- a/bindings/ruby/defs.h
\r
83 > +++ b/bindings/ruby/defs.h
\r
84 > @@ -24,31 +24,31 @@
\r
85 > =A0#include <notmuch.h>
\r
86 > =A0#include <ruby.h>
\r
88 > -VALUE notmuch_rb_cDatabase;
\r
89 > -VALUE notmuch_rb_cDirectory;
\r
90 > -VALUE notmuch_rb_cFileNames;
\r
91 > -VALUE notmuch_rb_cQuery;
\r
92 > -VALUE notmuch_rb_cThreads;
\r
93 > -VALUE notmuch_rb_cThread;
\r
94 > -VALUE notmuch_rb_cMessages;
\r
95 > -VALUE notmuch_rb_cMessage;
\r
96 > -VALUE notmuch_rb_cTags;
\r
98 > -VALUE notmuch_rb_eBaseError;
\r
99 > -VALUE notmuch_rb_eDatabaseError;
\r
100 > -VALUE notmuch_rb_eMemoryError;
\r
101 > -VALUE notmuch_rb_eReadOnlyError;
\r
102 > -VALUE notmuch_rb_eXapianError;
\r
103 > -VALUE notmuch_rb_eFileError;
\r
104 > -VALUE notmuch_rb_eFileNotEmailError;
\r
105 > -VALUE notmuch_rb_eNullPointerError;
\r
106 > -VALUE notmuch_rb_eTagTooLongError;
\r
107 > -VALUE notmuch_rb_eUnbalancedFreezeThawError;
\r
108 > -VALUE notmuch_rb_eUnbalancedAtomicError;
\r
111 > -ID ID_db_create;
\r
113 > +extern VALUE notmuch_rb_cDatabase;
\r
114 > +extern VALUE notmuch_rb_cDirectory;
\r
115 > +extern VALUE notmuch_rb_cFileNames;
\r
116 > +extern VALUE notmuch_rb_cQuery;
\r
117 > +extern VALUE notmuch_rb_cThreads;
\r
118 > +extern VALUE notmuch_rb_cThread;
\r
119 > +extern VALUE notmuch_rb_cMessages;
\r
120 > +extern VALUE notmuch_rb_cMessage;
\r
121 > +extern VALUE notmuch_rb_cTags;
\r
123 > +extern VALUE notmuch_rb_eBaseError;
\r
124 > +extern VALUE notmuch_rb_eDatabaseError;
\r
125 > +extern VALUE notmuch_rb_eMemoryError;
\r
126 > +extern VALUE notmuch_rb_eReadOnlyError;
\r
127 > +extern VALUE notmuch_rb_eXapianError;
\r
128 > +extern VALUE notmuch_rb_eFileError;
\r
129 > +extern VALUE notmuch_rb_eFileNotEmailError;
\r
130 > +extern VALUE notmuch_rb_eNullPointerError;
\r
131 > +extern VALUE notmuch_rb_eTagTooLongError;
\r
132 > +extern VALUE notmuch_rb_eUnbalancedFreezeThawError;
\r
133 > +extern VALUE notmuch_rb_eUnbalancedAtomicError;
\r
135 > +extern ID ID_call;
\r
136 > +extern ID ID_db_create;
\r
137 > +extern ID ID_db_mode;
\r
139 > =A0/* RSTRING_PTR() is new in ruby-1.9 */
\r
140 > =A0#if !defined(RSTRING_PTR)
\r
141 > diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
\r
142 > index 3fe60fb..f4931d3 100644
\r
143 > --- a/bindings/ruby/init.c
\r
144 > +++ b/bindings/ruby/init.c
\r
145 > @@ -20,6 +20,32 @@
\r
147 > =A0#include "defs.h"
\r
149 > +VALUE notmuch_rb_cDatabase;
\r
150 > +VALUE notmuch_rb_cDirectory;
\r
151 > +VALUE notmuch_rb_cFileNames;
\r
152 > +VALUE notmuch_rb_cQuery;
\r
153 > +VALUE notmuch_rb_cThreads;
\r
154 > +VALUE notmuch_rb_cThread;
\r
155 > +VALUE notmuch_rb_cMessages;
\r
156 > +VALUE notmuch_rb_cMessage;
\r
157 > +VALUE notmuch_rb_cTags;
\r
159 > +VALUE notmuch_rb_eBaseError;
\r
160 > +VALUE notmuch_rb_eDatabaseError;
\r
161 > +VALUE notmuch_rb_eMemoryError;
\r
162 > +VALUE notmuch_rb_eReadOnlyError;
\r
163 > +VALUE notmuch_rb_eXapianError;
\r
164 > +VALUE notmuch_rb_eFileError;
\r
165 > +VALUE notmuch_rb_eFileNotEmailError;
\r
166 > +VALUE notmuch_rb_eNullPointerError;
\r
167 > +VALUE notmuch_rb_eTagTooLongError;
\r
168 > +VALUE notmuch_rb_eUnbalancedFreezeThawError;
\r
169 > +VALUE notmuch_rb_eUnbalancedAtomicError;
\r
172 > +ID ID_db_create;
\r
176 > =A0* Document-module: Notmuch
\r
181 > _______________________________________________
\r
182 > notmuch mailing list
\r
183 > notmuch@notmuchmail.org
\r
184 > http://notmuchmail.org/mailman/listinfo/notmuch
\r
186 Looks highly familiar yet strangely good to me.
\r