From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OLE+GdZPnGBY9QAAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 23:59:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UE3pFNZPnGBVCgAA1q6Kng (envelope-from ) for ; Wed, 12 May 2021 21:59:50 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 1D11119032 for ; Wed, 12 May 2021 23:59:50 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id DEF5027185; Wed, 12 May 2021 17:59:45 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8CE7A2717A for ; Wed, 12 May 2021 17:59:42 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id AEE3660018; Wed, 12 May 2021 17:59:40 -0400 (EDT) Received: (nullmailer pid 1253388 invoked by uid 1000); Wed, 12 May 2021 21:59:39 -0000 From: David Bremner To: Felipe Contreras , notmuch@notmuchmail.org Subject: Re: [PATCH v2 04/10] ruby: simplify data get helper In-Reply-To: <20210504081749.715768-5-felipe.contreras@gmail.com> References: <20210504081749.715768-1-felipe.contreras@gmail.com> <20210504081749.715768-5-felipe.contreras@gmail.com> Date: Wed, 12 May 2021 18:59:39 -0300 Message-ID: <87bl9ffwac.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: G2MH7OTOCZQGEAWUAE27EFQ6FQHC73YH X-Message-ID-Hash: G2MH7OTOCZQGEAWUAE27EFQ6FQHC73YH 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620856790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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-unsubscribe:list-subscribe:list-post; bh=8EBbC5iIzuiq74wPbzfUlpdj3y+2hTLJnx8dYuALwlY=; b=cPziuhrGgpnIIJ75CeQYQQGAzZlIPiX5C0xVkOLJ3JwSKYl7Rnc4S+ivxp4R5iWBSq8Zgi Ztc/iBqVF8D4Q+OFW8RSwI1j4LWmx87QRlOS+mEnXlucZn8ogG38IsWqF6x8EWrC/UeBlM OlRWkc1p3wcXP6sA6iJHruJzdXmTsycnxwBv3UxqytPRORYoJ85oNFBA2hsiYCaP0F9TyC AO4wjEH5qzOtet+djezx0/JXKAmSDtbZAjbraVjSIscLvZZbiJnIrZQ3Jm8sYTXlI1XgDu q3tlDeIUEo7y3Kwyu4Hyqm9t0hmKpM7mJas0ChqB/JVSMiTcr93XU8AFJE5mLw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620856790; a=rsa-sha256; cv=none; b=Hr0T3YYV4G8vH9t34BnzFqP3l1GNsT3vewtZ5dPd0RlFuA8ibokw/lUNNw5xtmnjHcLwTp bT8UaYCXcnIYzPooMVNg7UIeU5l5pgKyxtbL4dYUixNIgvVvEoaVn77dP5LeX3Ldm2m2hZ yv7jXi7ZgnLftH2zjn+Pt83OURRSivgp+REZWRg0pcZyO3xWur7U1FeWJKXn03sDBASjCC IQT68hLq6TYXH2tBev4wuduSoFELOb75yAhE7En9ZT3M4DBJ3q4WqzLowAWcHoReeLTkRl Ypzx3ihTBbuamJxQkgbzEx5KV9zz9JtfNHw8TS5NtCT2NSM2+pY9xaXvRarwzw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 1D11119032 X-Spam-Score: -2.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: R4AQtI4L7I+D Felipe Contreras writes: > The type is not actually needed. > > Signed-off-by: Felipe Contreras > --- > bindings/ruby/defs.h | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h > index 46e2caf8..8fb47b4c 100644 > --- a/bindings/ruby/defs.h > +++ b/bindings/ruby/defs.h > @@ -55,39 +55,39 @@ extern ID ID_db_mode; > # define RSTRING_PTR(v) (RSTRING((v))->ptr) > #endif /* !defined (RSTRING_PTR) */ > > -#define Data_Get_Notmuch_Object(obj, type, message, ptr) \ > +#define Data_Get_Notmuch_Object(obj, message, ptr) \ > do { \ > - Data_Get_Struct ((obj), type, (ptr)); \ > + (ptr) = rb_data_object_get ((obj)); \ Please explain a bit more in the commit message what's going on here. Why is it OK to replace Data_Get_Struct with rb_data_object_get?