diff options
| author | Gerd Moellmann | 2001-01-09 20:11:40 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-01-09 20:11:40 +0000 |
| commit | 35f464a7581f0aaaa2c7c4a7fa4e5a548d0e0ed4 (patch) | |
| tree | d2c2dc02fcc4b81f44111f98d0b87fb4a24ee822 /src/lisp.h | |
| parent | 676a72518a2d168ba02311922e6d5cf8f3504f76 (diff) | |
| download | emacs-35f464a7581f0aaaa2c7c4a7fa4e5a548d0e0ed4.tar.gz emacs-35f464a7581f0aaaa2c7c4a7fa4e5a548d0e0ed4.zip | |
(STRING_BYTES) [GC_CHECK_STRING_BYTES]: Call
function string_bytes.
(GC_CHECK_STRING_BYTES): Moved here from alloc.c.
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h index f2096a5f616..b1951ea4365 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -26,6 +26,12 @@ Boston, MA 02111-1307, USA. */ | |||
| 26 | #define P_(proto) () | 26 | #define P_(proto) () |
| 27 | #endif | 27 | #endif |
| 28 | 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 | ||
| 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 |
| @@ -620,9 +626,20 @@ struct Lisp_Cons | |||
| 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) |
| 625 | 640 | ||
| 641 | #endif /* not GC_CHECK_STRING_BYTES */ | ||
| 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 | ||