From: Ken Raeburn Date: Sun, 2 Apr 2000 01:52:58 +0000 (+0000) Subject: * alloc.c (MARK_STRING, UNMARK_STRING, STRING_MARKED_P): Expand non-union-type X-Git-Tag: emacs-pretest-21.0.90~4359 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cc2d8c6b3dfb886957d7adfffbaeccdfb68ae13d;p=emacs.git * 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. --- diff --git a/src/ChangeLog b/src/ChangeLog index 20655598b1d..4622d9e6699 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2000-04-01 Ken Raeburn + + * 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. + 2000-04-01 Gerd Moellmann * term.c (TN_no_color_video): New variable. 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; /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ -#define MARK_STRING(S) XMARK ((S)->size) -#define UNMARK_STRING(S) XUNMARK ((S)->size) -#define STRING_MARKED_P(S) XMARKBIT ((S)->size) +#define MARK_STRING(S) ((S)->size |= MARKBIT) +#define UNMARK_STRING(S) ((S)->size &= ~MARKBIT) +#define STRING_MARKED_P(S) ((S)->size & MARKBIT) /* Value is the number of bytes/chars of S, a pointer to a struct Lisp_String. This must be used instead of STRING_BYTES (S) or @@ -798,7 +798,20 @@ mark_interval_tree (tree) } \ } while (0) - + +/* Number support. If NO_UNION_TYPE isn't in effect, we + can't create number objects in macros. */ +#ifndef make_number +Lisp_Object +make_number (n) + int n; +{ + Lisp_Object obj; + obj.s.val = n; + obj.s.type = Lisp_Int; + return obj; +} +#endif /*********************************************************************** String Allocation