From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id Y5SvBadLomDqMQAAgWs5BA (envelope-from ) for ; Mon, 17 May 2021 12:55:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aGLLAKdLomDSOgAA1q6Kng (envelope-from ) for ; Mon, 17 May 2021 10:55:35 +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 5F0251CEA7 for ; Mon, 17 May 2021 12:55:34 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0986E2A9F4; Mon, 17 May 2021 06:55:32 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id BFE6D2905F for ; Mon, 17 May 2021 06:55:29 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id B113460018; Mon, 17 May 2021 06:55:29 -0400 (EDT) Received: (nullmailer pid 3965170 invoked by uid 1000); Mon, 17 May 2021 10:55:28 -0000 From: David Bremner To: Felipe Contreras , notmuch@notmuchmail.org Subject: Re: [PATCH v3 1/7] ruby: simplify data get helper In-Reply-To: <20210515212103.1001295-2-felipe.contreras@gmail.com> References: <20210515212103.1001295-1-felipe.contreras@gmail.com> <20210515212103.1001295-2-felipe.contreras@gmail.com> Date: Mon, 17 May 2021 07:55:28 -0300 Message-ID: <877djxzl27.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: DSL4I2Z4I3ANIJS3CQYOCVUHWDKUM4EJ X-Message-ID-Hash: DSL4I2Z4I3ANIJS3CQYOCVUHWDKUM4EJ 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=1621248934; 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=+HhgVW2wjS32osYq88kFUKi32ltf0zt1Z8Zq2VyNQFg=; b=PVsWulb0jLzCrbfUtOyzvyhRh4e6O9QDqtp177g8sxqDvHH9vcReB5FU8CYyRsetew5uCl IzaEf9XoUugYpB3hR52YhpO1Z+i6uo6cbQv45B2PPBO3yebVOfl0SBlsU2ENhyzEofZ6g4 aUkHYtVybevCvoklJE4oTu6VVreGUOy/3riA52zCTNXumyZsuAGUKnDsO6l2E/coUpwabv hMzsjHsZR8638lTzCSMXlD6waldVTIWYeqtvtVzkSL07OMsLWtuLJmkW+XIO++ARnjHkhw hdohuSTJP+BqGUUM/qUFUdr8AEW7HPUrAdw0nbewXsNQO38IRiHpltpRyoaqLQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621248934; a=rsa-sha256; cv=none; b=hxIwzVdkAj68fufSEiXPGOtVYzmRt188mEwc6hBFh8XjU5FsLMkV5Knazeha4q5LL7x8z0 +SKQs21qiUtLu2j2elqbmmf3Qz+k56BhRMycbOzPJiecq4ALOu/f1+3SzcmzfF18Uzdkdc CtphDmVT0vDr6KEpcIkQf+n94GxW7EDf6PdlRe8TJbiQSy8tWVGByKDVkZo4ESyUvAIMoo FCO0ldfGOZBCu4qpD8MnRlcAD47qSjsOXwi+qyjt484JaBJaQOqkXSIjLk+Jyzg7ihyufc 3hZiTzfqmtOnrbqXZuv+OOlsAhs/p4kKZKwKTzKghNhkXwA6FpWAq04fOGhldQ== 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: 5F0251CEA7 X-Spam-Score: -2.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3AylQCMci4ls Felipe Contreras writes: > Data_Get_Struct is nothing but a macro that calls > rb_data_object_get with a cast (unnecessary in C). > > #define Data_Get_Struct(obj, type, sval) \ > ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj))) > > We can use rb_data_object_get directly, and this way we don't need to > pass the type, which is unnecessary information. Thanks for the updated commit messages. Applied to master d