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 503C3431FBF for ; Sat, 30 Mar 2013 06:17:52 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 lsWizJKcXX2Q for ; Sat, 30 Mar 2013 06:17:51 -0700 (PDT) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 754DA431FAE for ; Sat, 30 Mar 2013 06:17:51 -0700 (PDT) Received: by mail-lb0-f176.google.com with SMTP id y8so887275lbh.7 for ; Sat, 30 Mar 2013 06:17:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:x-gm-message-state; bh=YwB402aNrVdwymkBHHjGaGHA7+NzjjBmqWo/ZY9c2V4=; b=csuN4FxeRHUYW1jj3fiiGwiMEON4L6zcccWa3ny87M4VzM7ofSTKII6zgwHaTaeoHu eo6CKyCwIVmoV5yhNGrpL1/pxYj//8imXC12VmXbAtvvjXQohZGoxIg8yCPqkRlt4F5K TdIibw2Ytyo/DsDoT/mT2LR5BfQx8rEvireGZrnQ/MSaGu4BFAlxndLVHi0sQcabtcn4 inix1hLMmuBK4vfnBzpWYHd2fR8q3mc3QGnGK3Zg9yurMUfl6GCy05RINW4acEbNqL7R IaQ/6DYgxDbAbuA+QAXJFbcPX9TmYQ7NaK0VjdPDLLYayrsOGW2UPGolLxJ7xfdpuSbH U68w== X-Received: by 10.112.155.166 with SMTP id vx6mr2867800lbb.59.1364649468625; Sat, 30 Mar 2013 06:17:48 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-50df51-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id v7sm2582962lbg.13.2013.03.30.06.17.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 30 Mar 2013 06:17:47 -0700 (PDT) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] cli: mime node: abstract decryption and signature verification In-Reply-To: <87k3opiz71.fsf@maritornes.cs.unb.ca> References: <87k3opiz71.fsf@maritornes.cs.unb.ca> User-Agent: Notmuch/0.15.2+48~gc5630bf (http://notmuchmail.org) Emacs/24.2.1 (x86_64-pc-linux-gnu) Date: Sat, 30 Mar 2013 15:17:46 +0200 Message-ID: <87ppyhrpqd.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-Gm-Message-State: ALoCoQkFSyWzlCnyMHcboy1Q1dzoQvwE0m9v+qGKIJdu8Y4oiTlVYn8ejSsE28qzN6Ec8vkK2JZG 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: Sat, 30 Mar 2013 13:17:52 -0000 On Sat, 30 Mar 2013, David Bremner wrote: > Jani Nikula writes: > >> The code filled with #ifdef GMIME_ATLEAST_26 is difficult to >> read. Abstract the decryption and signature verification into >> functions, with separate implementations for GMime 2.4 and 2.6, to >> clarify the code. > > This series mostly looks OK, although it's a challenge to track all the > code movement. I agree it is. Personally I just tried to look at support for either 2.4 or 2.6 at a time, and compare the old and new code paths, to wrap my head around it. BTW I didn't test the 2.4 support, I don't have a system with that anymore. > I'd like some way to make it more obvious to the reader which version of > the functions they are reading (when the #ifdef GMIME_ATLEAST_26 has > scrolled off screen). The simplest would just be a comment in front of > each function. That feels a bit excessive, but perhaps that is just because I'm very accustomed to this style of conditional build. I can add the comments. BR, Jani.