From 9af63d2e8be06dec7a2f90bfe112cbc1397f7942 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 8 Oct 2022 16:24:40 +0200 Subject: [PATCH] Better Lisp_String comments * src/lisp.h (struct Lisp_String): Comments improved. * src/pdumper.c (dump_string): Update hash (comment change only). --- src/lisp.h | 13 +++++++++---- src/pdumper.c | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/lisp.h b/src/lisp.h index 9710dbef8d2..56f24d82810 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1575,10 +1575,15 @@ struct Lisp_String { struct { - ptrdiff_t size; /* MSB is used as the markbit. */ - ptrdiff_t size_byte; /* Set to -1 for unibyte strings, - -2 for data in rodata, - -3 for immovable unibyte strings. */ + /* Number of characters in string; MSB is used as the mark bit. */ + ptrdiff_t size; + /* If nonnegative, number of bytes in the string (which is multibyte). + If negative, the string is unibyte: + -1 for data normally allocated + -2 for data in rodata (C string constants) + -3 for data that must be immovable (used for bytecode) */ + ptrdiff_t size_byte; + INTERVAL intervals; /* Text properties in this string. */ unsigned char *data; } s; diff --git a/src/pdumper.c b/src/pdumper.c index 903298f17d2..5e6ccd9bd88 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2067,7 +2067,7 @@ dump_interval_tree (struct dump_context *ctx, static dump_off dump_string (struct dump_context *ctx, const struct Lisp_String *string) { -#if CHECK_STRUCTS && !defined (HASH_Lisp_String_C2CAF90352) +#if CHECK_STRUCTS && !defined (HASH_Lisp_String_03B2DF1C8E) # error "Lisp_String changed. See CHECK_STRUCTS comment in config.h." #endif /* If we have text properties, write them _after_ the string so that -- 2.39.5