From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#48264: [PATCH v3 02/15] Take offset not idx in PER_BUFFER_VALUE_P Date: Fri, 07 May 2021 08:45:56 -0400 Message-ID: <87wnsar9tn.fsf@catern.com> References: <877dkbsj9d.fsf@catern.com> <20210506213346.9730-3-sbaugh@catern.com> <83eeejc8br.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15114"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48264@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 07 15:04:13 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lf09M-0003py-P7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 15:04:12 +0200 Original-Received: from localhost ([::1]:54956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf09L-0006rj-O6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 09:04:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lezsk-0000Pe-Aj for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 08:47:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60371) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lezsk-0002pK-2v for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 08:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lezsj-0006Nh-W3 for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 08:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2021 12:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48264 X-GNU-PR-Package: emacs Original-Received: via spool by 48264-submit@debbugs.gnu.org id=B48264.162039156424513 (code B ref 48264); Fri, 07 May 2021 12:47:01 +0000 Original-Received: (at 48264) by debbugs.gnu.org; 7 May 2021 12:46:04 +0000 Original-Received: from localhost ([127.0.0.1]:43681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lezrn-0006NJ-Op for submit@debbugs.gnu.org; Fri, 07 May 2021 08:46:03 -0400 Original-Received: from venus.catern.com ([68.183.49.163]:59520) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lezrl-0006Mn-Cn for 48264@debbugs.gnu.org; Fri, 07 May 2021 08:46:02 -0400 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=98.7.229.235; helo=localhost; envelope-from=sbaugh@catern.com; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=catern.com; s=mail; t=1620391560; bh=JiRDa3/IiRSskuDLyYpg6/9OoP/QP/Gr4XEkyuAn6ps=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=jaoLIL1vcK1t79cnXEdgebjF0FeDNfl9hE9e/iySNBaVgA9lTUS3FF3v0hk4ZB98/ RqLnVzZUhNiZMeHgTcnJFQ29ZjVmKsbaQ+Fa8n9CgabyJegSQNV1JRCxunb5QPjnu+ vZqUBuCetU12cYxU5UmwidVEaDjrBu8Cesd3AqUM= Original-Received: from localhost (cpe-98-7-229-235.nyc.res.rr.com [98.7.229.235]) by venus.catern.com (Postfix) with ESMTPSA id 4DE442E4579; Fri, 7 May 2021 12:45:58 +0000 (UTC) In-Reply-To: <83eeejc8br.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205929 Archived-At: Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Thu, 6 May 2021 17:33:33 -0400 >> Cc: Spencer Baugh >> >> This improves clarity and allows us to more easily change how >> PER_BUFFER_VALUE_P works. >> >> * src/buffer.h (PER_BUFFER_VALUE_P): Move to be in scope of >> PER_BUFFER_IDX. Take offset instead of idx, and perform the common >> "idx == -1" check internally. >> * src/data.c (store_symval_forwarding, set_internal) >> (set_default_internal, Flocal_variable_p): >> * src/buffer.c (buffer_local_variables_1): Pass offset not idx to >> PER_BUFFER_VALUE_P, and remove idx == -1 checks. > > This moves an INLINE function from a header to a C file, which I'd > prefer to avoid (due to all kind of subtle issues with inline > functions). Can't you move PER_BUFFER_IDX to the header instead? You may have misread; PER_BUFFER_IDX and PER_BUFFER_VALUE_P are both still in the header.