[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9af63d2e8b 2/4: Better Lisp_String comments
From: |
Mattias Engdegård |
Subject: |
master 9af63d2e8b 2/4: Better Lisp_String comments |
Date: |
Sat, 8 Oct 2022 12:49:08 -0400 (EDT) |
branch: master
commit 9af63d2e8be06dec7a2f90bfe112cbc1397f7942
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
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 9710dbef8d..56f24d8281 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 903298f17d..5e6ccd9bd8 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