Mercurial > emacs
comparison src/lisp.h @ 35184:07ec5658a7a5
(STRING_BYTES) [GC_CHECK_STRING_BYTES]: Call
function string_bytes.
(GC_CHECK_STRING_BYTES): Moved here from alloc.c.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 09 Jan 2001 20:11:16 +0000 |
parents | 587912b40df2 |
children | b5a39d371511 |
comparison
equal
deleted
inserted
replaced
35183:cc2a06489f0d | 35184:07ec5658a7a5 |
---|---|
23 #if defined (PROTOTYPES) || defined (WINDOWSNT) | 23 #if defined (PROTOTYPES) || defined (WINDOWSNT) |
24 #define P_(proto) proto | 24 #define P_(proto) proto |
25 #else | 25 #else |
26 #define P_(proto) () | 26 #define P_(proto) () |
27 #endif | 27 #endif |
28 | |
29 /* Define this temporarily to hunt a bug. If defined, the size of | |
30 strings is redundantly recorded in sdata structures so that it can | |
31 be compared to the sizes recorded in Lisp strings. */ | |
32 | |
33 #define GC_CHECK_STRING_BYTES 1 | |
28 | 34 |
29 | 35 |
30 /* These are default choices for the types to use. */ | 36 /* These are default choices for the types to use. */ |
31 #ifdef _LP64 | 37 #ifdef _LP64 |
32 #ifndef EMACS_INT | 38 #ifndef EMACS_INT |
618 /* Nonzero if STR is a multibyte string. */ | 624 /* Nonzero if STR is a multibyte string. */ |
619 #define STRING_MULTIBYTE(STR) \ | 625 #define STRING_MULTIBYTE(STR) \ |
620 (XSTRING (STR)->size_byte >= 0) | 626 (XSTRING (STR)->size_byte >= 0) |
621 | 627 |
622 /* Return the length in bytes of STR. */ | 628 /* Return the length in bytes of STR. */ |
629 | |
630 #ifdef GC_CHECK_STRING_BYTES | |
631 | |
632 struct Lisp_String; | |
633 extern int string_bytes P_ ((struct Lisp_String *)); | |
634 #define STRING_BYTES(S) string_bytes ((S)) | |
635 | |
636 #else /* not GC_CHECK_STRING_BYTES */ | |
637 | |
623 #define STRING_BYTES(STR) \ | 638 #define STRING_BYTES(STR) \ |
624 ((STR)->size_byte < 0 ? (STR)->size : (STR)->size_byte) | 639 ((STR)->size_byte < 0 ? (STR)->size : (STR)->size_byte) |
640 | |
641 #endif /* not GC_CHECK_STRING_BYTES */ | |
625 | 642 |
626 /* Set the length in bytes of STR. */ | 643 /* Set the length in bytes of STR. */ |
627 #define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) | 644 #define SET_STRING_BYTES(STR, SIZE) ((STR)->size_byte = (SIZE)) |
628 | 645 |
629 /* In a string or vector, the sign bit of the `size' is the gc mark bit */ | 646 /* In a string or vector, the sign bit of the `size' is the gc mark bit */ |