diff options
| author | Helmut Eller | 2024-06-23 11:25:35 +0200 |
|---|---|---|
| committer | Helmut Eller | 2026-02-12 18:51:51 +0100 |
| commit | 6d9ba8e7bf045155bdd6dfbf8126fe866fd3e3aa (patch) | |
| tree | a9efcdcefb7a8167b58c6e2e76a5784db4143a24 /src/data.c | |
| parent | 10befec978d1f1490f1eb43fd590e9474252063f (diff) | |
| download | emacs-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/data.c')
| -rw-r--r-- | src/data.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/data.c b/src/data.c index 952c686a466..4334c8dabcb 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -65,11 +65,11 @@ XKBOARD_OBJFWD (lispfwd a) | |||
| 65 | eassert (KBOARD_OBJFWDP (a)); | 65 | eassert (KBOARD_OBJFWDP (a)); |
| 66 | return &a->u.kboardobjfwd; | 66 | return &a->u.kboardobjfwd; |
| 67 | } | 67 | } |
| 68 | static struct Lisp_Intfwd const * | 68 | static intmax_t * |
| 69 | XFIXNUMFWD (lispfwd a) | 69 | XINTVAR (lispfwd a) |
| 70 | { | 70 | { |
| 71 | eassert (INTFWDP (a)); | 71 | eassert (INTFWDP (a)); |
| 72 | return &a->u.intfwd; | 72 | return a->u.intvar; |
| 73 | } | 73 | } |
| 74 | static struct Lisp_Objfwd const * | 74 | static struct Lisp_Objfwd const * |
| 75 | XOBJFWD (lispfwd a) | 75 | XOBJFWD (lispfwd a) |
| @@ -1332,7 +1332,7 @@ do_symval_forwarding (lispfwd valcontents) | |||
| 1332 | switch (XFWDTYPE (valcontents)) | 1332 | switch (XFWDTYPE (valcontents)) |
| 1333 | { | 1333 | { |
| 1334 | case Lisp_Fwd_Int: | 1334 | case Lisp_Fwd_Int: |
| 1335 | return make_int (*XFIXNUMFWD (valcontents)->intvar); | 1335 | return make_int (*XINTVAR (valcontents)); |
| 1336 | 1336 | ||
| 1337 | case Lisp_Fwd_Bool: | 1337 | case Lisp_Fwd_Bool: |
| 1338 | return (*XBOOLFWD (valcontents)->boolvar ? Qt : Qnil); | 1338 | return (*XBOOLFWD (valcontents)->boolvar ? Qt : Qnil); |
| @@ -1418,7 +1418,7 @@ store_symval_forwarding (lispfwd valcontents, Lisp_Object newval, | |||
| 1418 | CHECK_INTEGER (newval); | 1418 | CHECK_INTEGER (newval); |
| 1419 | if (! integer_to_intmax (newval, &i)) | 1419 | if (! integer_to_intmax (newval, &i)) |
| 1420 | xsignal1 (Qoverflow_error, newval); | 1420 | xsignal1 (Qoverflow_error, newval); |
| 1421 | *XFIXNUMFWD (valcontents)->intvar = i; | 1421 | *XINTVAR (valcontents) = i; |
| 1422 | } | 1422 | } |
| 1423 | break; | 1423 | break; |
| 1424 | 1424 | ||