From: Mattias EngdegÄrd Date: Sat, 8 Oct 2022 14:24:40 +0000 (+0200) Subject: Better Lisp_String comments X-Git-Tag: emacs-29.0.90~1616^2~688 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9af63d2e8be06dec7a2f90bfe112cbc1397f7942;p=emacs.git Better Lisp_String comments * src/lisp.h (struct Lisp_String): Comments improved. * src/pdumper.c (dump_string): Update hash (comment change only). --- 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