Re: Alternative to no longer supported folder:foo* wildcard matching ?
[notmuch-archives.git] / da / 3e817a57fc8976a364d66e774e70469d35280a
1 Return-Path: <Vladimir.Marek@Oracle.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 E8B8B414B8D\r
6         for <notmuch@notmuchmail.org>; Mon,  9 Apr 2012 11:16:16 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -4.999\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.999 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_HI=-5, UNPARSEABLE_RELAY=0.001]\r
13         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 xvF+Ljw03T1D for <notmuch@notmuchmail.org>;\r
17         Mon,  9 Apr 2012 11:16:16 -0700 (PDT)\r
18 Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 5A4EF41735F\r
22         for <notmuch@notmuchmail.org>; Mon,  9 Apr 2012 11:16:16 -0700 (PDT)\r
23 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])\r
24         by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with\r
25         ESMTP id q39IGEMf026954\r
26         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)\r
27         for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 18:16:15 GMT\r
28 Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158])\r
29         by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id\r
30         q39IGEFm000337\r
31         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)\r
32         for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 18:16:14 GMT\r
33 Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55])\r
34         by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id\r
35         q39IGDdc006260\r
36         for <notmuch@notmuchmail.org>; Mon, 9 Apr 2012 13:16:13 -0500\r
37 Received: from pub.czech.sun.com (/10.163.20.32)\r
38         by default (Oracle Beehive Gateway v4.0)\r
39         with ESMTP ; Mon, 09 Apr 2012 11:16:13 -0700\r
40 Date: Mon, 9 Apr 2012 20:15:43 +0200\r
41 From: Vladimir Marek <Vladimir.Marek@Oracle.COM>\r
42 To: Notmuch Mail <notmuch@notmuchmail.org>\r
43 Subject: Re: [PATCH 4/4] Explicitly type void* pointers\r
44 Message-ID: <20120409181543.GC10554@pub.czech.sun.com>\r
45 Mail-Followup-To: Notmuch Mail <notmuch@notmuchmail.org>\r
46 References: <1333966665-10469-1-git-send-email-Vladimir.Marek@oracle.com>\r
47         <1333966665-10469-5-git-send-email-Vladimir.Marek@oracle.com>\r
48         <CAB+hUn_QyMAfC1-Dr23T63ObX=cwuBOzcyCi=61w0MtGRMyt2w@mail.gmail.com>\r
49 MIME-Version: 1.0\r
50 Content-Type: text/plain; charset=utf-8\r
51 Content-Disposition: inline\r
52 In-Reply-To:\r
53  <CAB+hUn_QyMAfC1-Dr23T63ObX=cwuBOzcyCi=61w0MtGRMyt2w@mail.gmail.com>\r
54 User-Agent: Mutt/1.5.21 (2010-09-15)\r
55 X-Source-IP: acsinet22.oracle.com [141.146.126.238]\r
56 X-CT-RefId: str=0001.0A090207.4F83276F.00EC,ss=1,re=0.000,fgs=0\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Mon, 09 Apr 2012 18:16:17 -0000\r
70 \r
71 Hi,\r
72 \r
73 > Hi, does notmuch not compile without this? IIRC talloc_steal is a macro\r
74 > that's supposed to provide type safety (at least with GCC), and I'd be\r
75 > hesitant about adding the casts. Please look in your talloc.h.\r
76 \r
77 It does not compile. It might be that I'm using Sun/Oracle CC instead of\r
78 gcc. The error looks like this:\r
79 \r
80 "lib/database.cc", line 1368: Error: Cannot assign void* to const char*.\r
81 \r
82 \r
83 When looking into talloc documentation, the definition seems to be:\r
84 \r
85 void* talloc_steal ( const void * new_ctx, const void * ptr )\r
86 \r
87 http://talloc.samba.org/talloc/doc/html/group__talloc.html#gaccc66139273e727183fb5bdda11ef82c\r
88 \r
89 \r
90 When looking into talloc.h, it says:\r
91 \r
92 /* try to make talloc_set_destructor() and talloc_steal() type safe,\r
93    if we have a recent gcc */\r
94 \r
95 So, maybe the way to satisfy everyone would be:\r
96 \r
97 notmuch_message_t *tmp_message = message;\r
98 talloc_steal(notmuch, tmp_message);\r
99 return(tmp_message);\r
100 \r
101 Or alternatively,\r
102 \r
103 #if (__GNUC__ >= 3)\r
104        return talloc_steal (notmuch, message);\r
105 #else\r
106        return (notmuch_message_t*) talloc_steal (notmuch, message);\r
107 #fi\r
108 \r
109 \r
110 Of course I'm happy either way :)\r
111 \r
112 Thank you\r
113 -- \r
114         Vlad\r