diff options
| author | Karl Heuer | 1994-11-15 21:44:10 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-11-15 21:44:10 +0000 |
| commit | 8548150755694d1f1bb587e10d6ebb446e829330 (patch) | |
| tree | 9372c47c42deb171e9ffe57f8857759ac475063e /src/alloc.c | |
| parent | 9c833060e3617af13f28c2affc2d61d6d7947b31 (diff) | |
| download | emacs-8548150755694d1f1bb587e10d6ebb446e829330.tar.gz emacs-8548150755694d1f1bb587e10d6ebb446e829330.zip | |
(free_float): Don't assume XFASTINT accesses the raw bits.
(make_float, free_cons, Fcons, Fmake_symbol, gc_sweep): Likewise.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/alloc.c b/src/alloc.c index bd62b95fc5e..fac718eb20c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -435,7 +435,7 @@ init_float () | |||
| 435 | free_float (ptr) | 435 | free_float (ptr) |
| 436 | struct Lisp_Float *ptr; | 436 | struct Lisp_Float *ptr; |
| 437 | { | 437 | { |
| 438 | XSETFASTINT (ptr->type, (EMACS_INT) float_free_list); | 438 | *(struct Lisp_Float **)&ptr->type = float_free_list; |
| 439 | float_free_list = ptr; | 439 | float_free_list = ptr; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| @@ -448,7 +448,7 @@ make_float (float_value) | |||
| 448 | if (float_free_list) | 448 | if (float_free_list) |
| 449 | { | 449 | { |
| 450 | XSETFLOAT (val, float_free_list); | 450 | XSETFLOAT (val, float_free_list); |
| 451 | float_free_list = (struct Lisp_Float *) XFASTINT (float_free_list->type); | 451 | float_free_list = *(struct Lisp_Float **)&float_free_list->type; |
| 452 | } | 452 | } |
| 453 | else | 453 | else |
| 454 | { | 454 | { |
| @@ -508,7 +508,7 @@ init_cons () | |||
| 508 | free_cons (ptr) | 508 | free_cons (ptr) |
| 509 | struct Lisp_Cons *ptr; | 509 | struct Lisp_Cons *ptr; |
| 510 | { | 510 | { |
| 511 | XSETFASTINT (ptr->car, (EMACS_INT) cons_free_list); | 511 | *(struct Lisp_Cons **)&ptr->car = cons_free_list; |
| 512 | cons_free_list = ptr; | 512 | cons_free_list = ptr; |
| 513 | } | 513 | } |
| 514 | 514 | ||
| @@ -522,7 +522,7 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 522 | if (cons_free_list) | 522 | if (cons_free_list) |
| 523 | { | 523 | { |
| 524 | XSETCONS (val, cons_free_list); | 524 | XSETCONS (val, cons_free_list); |
| 525 | cons_free_list = (struct Lisp_Cons *) XFASTINT (cons_free_list->car); | 525 | cons_free_list = *(struct Lisp_Cons **)&cons_free_list->car; |
| 526 | } | 526 | } |
| 527 | else | 527 | else |
| 528 | { | 528 | { |
| @@ -708,8 +708,7 @@ Its value and function definition are void, and its property list is nil.") | |||
| 708 | if (symbol_free_list) | 708 | if (symbol_free_list) |
| 709 | { | 709 | { |
| 710 | XSETSYMBOL (val, symbol_free_list); | 710 | XSETSYMBOL (val, symbol_free_list); |
| 711 | symbol_free_list | 711 | symbol_free_list = *(struct Lisp_Symbol **)&symbol_free_list->value; |
| 712 | = (struct Lisp_Symbol *) XFASTINT (symbol_free_list->value); | ||
| 713 | } | 712 | } |
| 714 | else | 713 | else |
| 715 | { | 714 | { |
| @@ -1788,8 +1787,8 @@ gc_sweep () | |||
| 1788 | for (i = 0; i < lim; i++) | 1787 | for (i = 0; i < lim; i++) |
| 1789 | if (!XMARKBIT (cblk->conses[i].car)) | 1788 | if (!XMARKBIT (cblk->conses[i].car)) |
| 1790 | { | 1789 | { |
| 1791 | XSETFASTINT (cblk->conses[i].car, (EMACS_INT) cons_free_list); | ||
| 1792 | num_free++; | 1790 | num_free++; |
| 1791 | *(struct Lisp_Cons **)&cblk->conses[i].car = cons_free_list; | ||
| 1793 | cons_free_list = &cblk->conses[i]; | 1792 | cons_free_list = &cblk->conses[i]; |
| 1794 | } | 1793 | } |
| 1795 | else | 1794 | else |
| @@ -1818,8 +1817,8 @@ gc_sweep () | |||
| 1818 | for (i = 0; i < lim; i++) | 1817 | for (i = 0; i < lim; i++) |
| 1819 | if (!XMARKBIT (fblk->floats[i].type)) | 1818 | if (!XMARKBIT (fblk->floats[i].type)) |
| 1820 | { | 1819 | { |
| 1821 | XSETFASTINT (fblk->floats[i].type, (EMACS_INT) float_free_list); | ||
| 1822 | num_free++; | 1820 | num_free++; |
| 1821 | *(struct Lisp_Float **)&fblk->floats[i].type = float_free_list; | ||
| 1823 | float_free_list = &fblk->floats[i]; | 1822 | float_free_list = &fblk->floats[i]; |
| 1824 | } | 1823 | } |
| 1825 | else | 1824 | else |
| @@ -1882,7 +1881,7 @@ gc_sweep () | |||
| 1882 | for (i = 0; i < lim; i++) | 1881 | for (i = 0; i < lim; i++) |
| 1883 | if (!XMARKBIT (sblk->symbols[i].plist)) | 1882 | if (!XMARKBIT (sblk->symbols[i].plist)) |
| 1884 | { | 1883 | { |
| 1885 | XSETFASTINT (sblk->symbols[i].value, (EMACS_INT) symbol_free_list); | 1884 | *(struct Lisp_Symbol **)&sblk->symbols[i].value = symbol_free_list; |
| 1886 | symbol_free_list = &sblk->symbols[i]; | 1885 | symbol_free_list = &sblk->symbols[i]; |
| 1887 | num_free++; | 1886 | num_free++; |
| 1888 | } | 1887 | } |