From: tomo Date: Tue, 30 May 2000 12:01:39 +0000 (+0000) Subject: (struct lrecord_header): Add new member `older' in UTF-2000. X-Git-Tag: r21-2-33-utf-2000-0_16~28 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=48121a7d66297d26e60fa730b103762137652614;p=chise%2Fxemacs-chise.git- (struct lrecord_header): Add new member `older' in UTF-2000. (set_lheader_implementation): Setup `SLI_header->older' in UTF-2000. (set_lheader_older_implementation): New macro in UTF-2000. (OLDER_RECORD_P): New macro in UTF-2000. (OLDER_RECORD_HEADER_P): New macro in UTF-2000. (alloc_older_lcrecord): New prototype in UTF-2000. (alloc_older_lcrecord_type): New macro in UTF-2000. --- diff --git a/src/lrecord.h b/src/lrecord.h index fd8ac68..bee5101 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -75,18 +75,43 @@ struct lrecord_header /* 1 if the object is readonly from lisp */ unsigned int lisp_readonly :1; + +#ifdef UTF2000 + /* The `older field is a flag that indicates whether this lcrecord + is on a "older storage". */ + unsigned int older :1; +#endif }; struct lrecord_implementation; int lrecord_type_index (const struct lrecord_implementation *implementation); +#ifdef UTF2000 #define set_lheader_implementation(header,imp) do { \ struct lrecord_header* SLI_header = (header); \ SLI_header->type = (imp)->lrecord_type_index; \ SLI_header->mark = 0; \ + SLI_header->older = 0; \ SLI_header->c_readonly = 0; \ SLI_header->lisp_readonly = 0; \ } while (0) +#define set_lheader_older_implementation(header,imp) do { \ + struct lrecord_header* SLI_header = (header); \ + SLI_header->type = (imp)->lrecord_type_index; \ + SLI_header->mark = 0; \ + SLI_header->older = 1; \ + SLI_header->c_readonly = 0; \ + SLI_header->lisp_readonly = 0; \ +} while (0) +#else +#define set_lheader_implementation(header,imp) do { \ + struct lrecord_header* SLI_header = (header); \ + SLI_header->type = (imp)->lrecord_type_index; \ + SLI_header->mark = 0; \ + SLI_header->c_readonly = 0; \ + SLI_header->lisp_readonly = 0; \ +} while (0) +#endif struct lcrecord_header { @@ -273,6 +298,10 @@ extern int gc_in_progress; #define MARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 1)) #define UNMARK_RECORD_HEADER(lheader) ((void) ((lheader)->mark = 0)) +#define OLDER_RECORD_P(obj) (XRECORD_LHEADER (obj)->older) +#define OLDER_RECORD_HEADER_P(lheader) ((lheader)->older) + + #define C_READONLY_RECORD_HEADER_P(lheader) ((lheader)->c_readonly) #define LISP_READONLY_RECORD_HEADER_P(lheader) ((lheader)->lisp_readonly) #define SET_C_READONLY_RECORD_HEADER(lheader) do { \ @@ -574,6 +603,14 @@ void *alloc_lcrecord (size_t size, const struct lrecord_implementation *); #define alloc_lcrecord_type(type, lrecord_implementation) \ ((type *) alloc_lcrecord (sizeof (type), lrecord_implementation)) +#ifdef UTF2000 +void * +alloc_older_lcrecord (size_t size, const struct lrecord_implementation *); + +#define alloc_older_lcrecord_type(type, lrecord_implementation) \ + ((type *) alloc_older_lcrecord (sizeof (type), lrecord_implementation)) +#endif + /* Copy the data from one lcrecord structure into another, but don't overwrite the header information. */