diff options
| author | Ken Raeburn | 2000-04-02 01:52:58 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2000-04-02 01:52:58 +0000 |
| commit | cc2d8c6b3dfb886957d7adfffbaeccdfb68ae13d (patch) | |
| tree | 6584a850113a14a9528780f1856d96f46f43e119 /src/alloc.c | |
| parent | ccf5869a2ed23ebb44fcfb41f234a52e6a7fe835 (diff) | |
| download | emacs-cc2d8c6b3dfb886957d7adfffbaeccdfb68ae13d.tar.gz emacs-cc2d8c6b3dfb886957d7adfffbaeccdfb68ae13d.zip | |
* alloc.c (MARK_STRING, UNMARK_STRING, STRING_MARKED_P): Expand non-union-type
versions of XMARK and friends here, because XMARK and friends won't work on an
integer field if NO_UNION_TYPE is not defined.
(make_number): Define as a function if it's not defined as a macro.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/alloc.c b/src/alloc.c index a32718d82f4..f6f5c2c0ff8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -97,9 +97,9 @@ static __malloc_size_t bytes_used_when_full; | |||
| 97 | /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer | 97 | /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer |
| 98 | to a struct Lisp_String. */ | 98 | to a struct Lisp_String. */ |
| 99 | 99 | ||
| 100 | #define MARK_STRING(S) XMARK ((S)->size) | 100 | #define MARK_STRING(S) ((S)->size |= MARKBIT) |
| 101 | #define UNMARK_STRING(S) XUNMARK ((S)->size) | 101 | #define UNMARK_STRING(S) ((S)->size &= ~MARKBIT) |
| 102 | #define STRING_MARKED_P(S) XMARKBIT ((S)->size) | 102 | #define STRING_MARKED_P(S) ((S)->size & MARKBIT) |
| 103 | 103 | ||
| 104 | /* Value is the number of bytes/chars of S, a pointer to a struct | 104 | /* Value is the number of bytes/chars of S, a pointer to a struct |
| 105 | Lisp_String. This must be used instead of STRING_BYTES (S) or | 105 | Lisp_String. This must be used instead of STRING_BYTES (S) or |
| @@ -798,7 +798,20 @@ mark_interval_tree (tree) | |||
| 798 | } \ | 798 | } \ |
| 799 | } while (0) | 799 | } while (0) |
| 800 | 800 | ||
| 801 | 801 | ||
| 802 | /* Number support. If NO_UNION_TYPE isn't in effect, we | ||
| 803 | can't create number objects in macros. */ | ||
| 804 | #ifndef make_number | ||
| 805 | Lisp_Object | ||
| 806 | make_number (n) | ||
| 807 | int n; | ||
| 808 | { | ||
| 809 | Lisp_Object obj; | ||
| 810 | obj.s.val = n; | ||
| 811 | obj.s.type = Lisp_Int; | ||
| 812 | return obj; | ||
| 813 | } | ||
| 814 | #endif | ||
| 802 | 815 | ||
| 803 | /*********************************************************************** | 816 | /*********************************************************************** |
| 804 | String Allocation | 817 | String Allocation |