From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oAnbL7UovGTXCgEASxT56A (envelope-from ) for ; Sat, 22 Jul 2023 21:06:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UOmqL7UovGTy5gAA9RJhRA (envelope-from ) for ; Sat, 22 Jul 2023 21:06:29 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6ECD23DE4D for ; Sat, 22 Jul 2023 21:06:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690052789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=bITtYfwWKwlweC8x12w2nrjrGFJWz7LOEWLyH/Q1eSg=; b=Ik0w5DjeqYffPOt678ilymwa6z2k2+KVjrUqI3R1pN+Un9UIhuJvFrfnzs51WrZSmbOlvd CDe4am0GoP5Ge902Wy6/HAP8Axc0d+QmeR432rWbPJilY2LTAnNrZARUnnZ4XicTdJbtMP FR+pcSRVzGDA1ixhANOVL3uTP8v/h1LUNUO3Z+tWzoIiJo8VnYvEzUs/qFv3Vs/ZQtyQ7b xRXEOscvz2qxvJ7ZMstvKoe/j7Z8RkdOkKApcxrQtBWBJ1o6NmqHNea0Z/pApg7QDEF5xx NtkcOn9kU0r454BwewUWuuTLOLJFLBavtUQh05ZSQkfbM/1sNikhEdxsr3jTKg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690052789; a=rsa-sha256; cv=none; b=Cr5d2XJNtwUZrTT3iWtKBAiUrnz4rUq9jOuw+6y7wlQ9aggAQsCg6HeKf9XMn5xsaDaL+g NT0EKM7usqgHUjuemBijZLQ9d+wCA/pOeJ2F1CcukJWRjD1DWGbQnyhAKf0cRt9sLnW85G IREATvMUc2xDmZeSVxkDsehs06RrAIMEUrGuT3Hh99fVi2hnjTJtW8f6QfVs37yU8ybP9B sPKqFjl6h7PxvVLezfCXOu+jtuq0brtJdgmjLRFocUDKiMWoaQWzdQ1FXfA7luHyhebd+l AkJ0evf97yCzSBkPShtOJ5XWr6uU0fgEsfVFQDKQgz/X4dX/DmR2j/4CiIP/qg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 60C8D5F707; Sat, 22 Jul 2023 19:06:27 +0000 (UTC) Received: from phubs.tethera.net (unknown [IPv6:2607:5300:60:3a9d::1]) by mail.notmuchmail.org (Postfix) with ESMTPS id 083455F6D7 for ; Sat, 22 Jul 2023 19:06:25 +0000 (UTC) Received: from tethera.net (fctnnbsc51w-159-2-210-253.dhcp-dynamic.fibreop.nb.bellaliant.net [159.2.210.253]) by phubs.tethera.net (Postfix) with ESMTPS id 47182180172; Sat, 22 Jul 2023 16:06:23 -0300 (ADT) Received: (nullmailer pid 1057503 invoked by uid 1000); Sat, 22 Jul 2023 19:06:22 -0000 From: David Bremner To: Kevin Boulain , notmuch@notmuchmail.org Subject: Re: [PATCH 2/2] lib: thread-safe s-expression query parser In-Reply-To: <20230403203146.39749-2-kevin@boula.in> References: <20230403203146.39749-1-kevin@boula.in> <20230403203146.39749-2-kevin@boula.in> Date: Sat, 22 Jul 2023 16:06:22 -0300 Message-ID: <87fs5fg40h.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 2DN4I2TCO2XPUVYNK4D62OMCDEUD3WEQ X-Message-ID-Hash: 2DN4I2TCO2XPUVYNK4D62OMCDEUD3WEQ X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Kevin Boulain X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -2.08 X-Spam-Score: -2.08 X-Migadu-Queue-Id: 6ECD23DE4D X-TUID: kAL/XVmBsAZt Kevin Boulain writes: > + > +inline Xapian::Query > +_sexp_initial_query (_sexp_initial_t initial) My first thought was that this should be static, but maybe it doesn't matter in C++; I see the other inline functions in that file are not declared static. > + } > + assert (! "unreachable"); I stumbled over the logic this code. I would prefer not to use assert for this. In a few other places we call INTERNAL_ERROR from a default: case. Other than those quibbles, the change looks reasonable. I'm unsure how to test it though.