GNU bug report logs - #48264
28.0.50; Changing the default for DEFVAR_PER_BUFFER variables takes O(#buffers) time

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> catern.com>

Date: Thu, 6 May 2021 20:25:01 UTC

Severity: normal

Found in version 28.0.50

Full log


Message #56 received at 48264 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Spencer Baugh <sbaugh <at> catern.com>
Cc: 48264 <at> debbugs.gnu.org
Subject: Re: bug#48264: [PATCH v3 02/15] Take offset not idx in
 PER_BUFFER_VALUE_P
Date: Fri, 07 May 2021 10:27:20 +0300
> From: Spencer Baugh <sbaugh <at> catern.com>
> Date: Thu,  6 May 2021 17:33:33 -0400
> Cc: Spencer Baugh <sbaugh <at> catern.com>
> 
> 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?

Thanks.




This bug report was last modified 2 years and 289 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.