aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorHelmut Eller2024-06-23 11:25:35 +0200
committerHelmut Eller2026-02-12 18:51:51 +0100
commit6d9ba8e7bf045155bdd6dfbf8126fe866fd3e3aa (patch)
treea9efcdcefb7a8167b58c6e2e76a5784db4143a24 /src/lisp.h
parent10befec978d1f1490f1eb43fd590e9474252063f (diff)
downloademacs-6d9ba8e7bf045155bdd6dfbf8126fe866fd3e3aa.tar.gz
emacs-6d9ba8e7bf045155bdd6dfbf8126fe866fd3e3aa.zip
Remove struct Lisp_Intfwd
It was a struct with a single field. * src/lisp.h (struct Lisp_Intfwd): Deleted. (struct Lisp_Fwd): Add an intvar field instead. (DEFVAR_INT): Update accordingly. * src/data.c (XINTVAR): Updated and renamed from XFIXNUMFWD. (do_symval_forwarding, store_symval_forwarding): Use it.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 6cb05141ea4..d35450df5fd 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3053,15 +3053,6 @@ make_uint (uintmax_t n)
3053 (EXPR_SIGNED (expr) ? make_int (expr) : make_uint (expr)) 3053 (EXPR_SIGNED (expr) ? make_int (expr) : make_uint (expr))
3054 3054
3055 3055
3056/* Forwarding pointer to an int variable.
3057 This is allowed only in the value cell of a symbol,
3058 and it means that the symbol's value really lives in the
3059 specified int variable. */
3060struct Lisp_Intfwd
3061 {
3062 intmax_t *intvar;
3063 };
3064
3065/* Boolean forwarding pointer to an int variable. 3056/* Boolean forwarding pointer to an int variable.
3066 This is like Lisp_Intfwd except that the ostensible 3057 This is like Lisp_Intfwd except that the ostensible
3067 "value" of the symbol is t if the bool variable is true, 3058 "value" of the symbol is t if the bool variable is true,
@@ -3144,7 +3135,7 @@ struct Lisp_Fwd
3144 enum Lisp_Fwd_Type type; 3135 enum Lisp_Fwd_Type type;
3145 union 3136 union
3146 { 3137 {
3147 struct Lisp_Intfwd intfwd; 3138 intmax_t *intvar;
3148 struct Lisp_Boolfwd boolfwd; 3139 struct Lisp_Boolfwd boolfwd;
3149 struct Lisp_Objfwd objfwd; 3140 struct Lisp_Objfwd objfwd;
3150 struct Lisp_Buffer_Objfwd bufobjfwd; 3141 struct Lisp_Buffer_Objfwd bufobjfwd;
@@ -3530,13 +3521,12 @@ extern void defvar_kboard (struct Lisp_Fwd const *, char const *);
3530 = {Lisp_Fwd_Bool, .u.boolfwd = {&globals.f_##vname}}; \ 3521 = {Lisp_Fwd_Bool, .u.boolfwd = {&globals.f_##vname}}; \
3531 defvar_bool (&b_fwd, lname); \ 3522 defvar_bool (&b_fwd, lname); \
3532 } while (false) 3523 } while (false)
3533#define DEFVAR_INT(lname, vname, doc) \ 3524#define DEFVAR_INT(lname, vname, doc) \
3534 do { \ 3525 do { \
3535 static struct Lisp_Fwd const i_fwd \ 3526 static struct Lisp_Fwd const i_fwd \
3536 = {Lisp_Fwd_Int, .u.intfwd = {&globals.f_##vname}}; \ 3527 = {Lisp_Fwd_Int, .u.intvar = &globals.f_##vname}; \
3537 defvar_int (&i_fwd, lname); \ 3528 defvar_int (&i_fwd, lname); \
3538 } while (false) 3529 } while (false)
3539
3540#define DEFVAR_KBOARD(lname, vname, doc) \ 3530#define DEFVAR_KBOARD(lname, vname, doc) \
3541do \ 3531do \
3542 { \ 3532 { \