[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is not 0
From: |
Spencer Baugh |
Subject: |
[PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is not 0 |
Date: |
Sat, 21 Nov 2020 21:34:40 -0500 |
PER_BUFFER_IDX can't be 0 for Lisp variables - so this if-check was
always pointless.
---
src/data.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/data.c b/src/data.c
index b7ad4ef1db..f472127599 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1626,8 +1626,8 @@ default_value (Lisp_Object symbol)
if (BUFFER_OBJFWDP (valcontents))
{
int offset = XBUFFER_OBJFWD (valcontents)->offset;
- if (PER_BUFFER_IDX (offset) != 0)
- return per_buffer_default (offset);
+ eassert (PER_BUFFER_IDX (offset) != 0);
+ return per_buffer_default (offset);
}
/* For other variables, get the current value. */
--
2.28.0
- [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, (continued)
- [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, Spencer Baugh, 2020/11/21
- [PATCH v2 01/16] Add a test for let-binding unwinding, Spencer Baugh, 2020/11/21
- [PATCH v2 05/16] Add BVAR_DEFAULT for access to buffer defaults, Spencer Baugh, 2020/11/21
- [PATCH v2 02/16] Assert not local-variable-p after setq in let_default binding, Spencer Baugh, 2020/11/21
- [PATCH v2 03/16] Stop checking the constant default for enable_multibyte_characters, Spencer Baugh, 2020/11/21
- [PATCH v2 04/16] Take buffer field name in DEFVAR_PER_BUFFER, Spencer Baugh, 2020/11/21
- [PATCH v2 08/16] Combine unnecessarily separate loops in buffer.c, Spencer Baugh, 2020/11/21
- [PATCH v2 09/16] Add and use BUFFER_DEFAULT_VALUE_P, Spencer Baugh, 2020/11/21
- [PATCH v2 06/16] Use bset_* functions instead of BVAR, Spencer Baugh, 2020/11/21
- [PATCH v2 07/16] Take offset not idx in PER_BUFFER_VALUE_P, Spencer Baugh, 2020/11/21
- [PATCH v2 11/16] Assert that PER_BUFFER_IDX for Lisp variables is not 0,
Spencer Baugh <=
- [PATCH v2 14/16] Remove unnecessary Qunbound check, Spencer Baugh, 2020/11/21
- [PATCH v2 10/16] Add and use KILL_PER_BUFFER_VALUE, Spencer Baugh, 2020/11/21
- [PATCH v2 13/16] Get rid of buffer_permanent_local_flags array, Spencer Baugh, 2020/11/21
- Re: [PATCH v2 13/16] Get rid of buffer_permanent_local_flags array, Eli Zaretskii, 2020/11/22
- [PATCH v2 12/16] Rearrange set_internal for buffer forwarded symbols, Spencer Baugh, 2020/11/21
- [PATCH v2 15/16] Remove local_flags array in struct buffer, Spencer Baugh, 2020/11/21
- Re: [PATCH v2 15/16] Remove local_flags array in struct buffer, Stefan Monnier, 2020/11/22
- [PATCH v2 16/16] Remove usage of buffer_local_flags, Spencer Baugh, 2020/11/21
- Re: [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, Kévin Le Gouguec, 2020/11/22
- Re: [PATCH v2 00/16] Speeding up DEFVAR_PER_BUFFER, Eli Zaretskii, 2020/11/22