bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48264: [PATCH v3 07/15] Add BVAR_OR_DEFAULT macro as a stub


From: Eli Zaretskii
Subject: bug#48264: [PATCH v3 07/15] Add BVAR_OR_DEFAULT macro as a stub
Date: Fri, 07 May 2021 13:54:15 +0300

> From: Spencer Baugh <sbaugh@catern.com>
> Date: Thu,  6 May 2021 17:33:38 -0400
> Cc: Spencer Baugh <sbaugh@catern.com>
> 
> For buffer variables without a default, we still use BVAR.  For any
> buffer variable with a default, we use BVAR_OR_DEFAULT.  A later
> commit will statically enforce this.

This part says they are the same:

> --- a/src/buffer.h
> +++ b/src/buffer.h
> @@ -284,6 +284,8 @@ struct buffer_text
>  
>  #define BVAR(buf, field) ((buf)->field ## _)
>  
> +#define BVAR_OR_DEFAULT(buf, field) BVAR (buf, field)

What am I missing here?

Also, I have a question: suppose we have a variable that is defined
with DEFVAR_LISP, and then some Lisp calls make-variable-buffer-local:
how will that work with these two macros when the C code needs to
access the buffer-local value?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]