emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 92ed2fe: Merge from origin/emacs-28


From: Stefan Kangas
Subject: master 92ed2fe: Merge from origin/emacs-28
Date: Wed, 15 Dec 2021 00:50:48 -0500 (EST)

branch: master
commit 92ed2fe6886a367f00cf04a11d39b4fbf7a44edc
Merge: aab2477 7078f32
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Merge from origin/emacs-28
    
    7078f32b5b Fix crash when dumping charset_table with portable dumper ...
    a4fcbf46a7 ; etc/NEWS: Move the note about Xref EIEIO change to the p...
    f88c1d222f Remove maintainer comment from Emacs 28 module snippet.
    
    # Conflicts:
    #   etc/NEWS
---
 etc/NEWS.28   | 28 ++++++++++++++--------------
 src/charset.c |  2 +-
 src/charset.h |  1 +
 src/pdumper.c |  4 ++--
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/etc/NEWS.28 b/etc/NEWS.28
index d2565e5..e7d7215 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -1011,20 +1011,6 @@ file:
 
     (add-hook 'foo-mode-hook (lambda () (auto-fill-mode -1))
 
-** Xref migrated from EIEIO to cl-defstruct for its core objects.
-This means that 'oref' and 'with-slots' no longer works on them, and
-'make-instance' can no longer be used to create those instances (which
-wasn't recommended anyway).  Packages should restrict themselves to
-using functions like 'xref-make', 'xref-make-match',
-'xref-make-*-location', as well as accessor functions
-'xref-item-summary' and 'xref-item-location'.
-
-Among the benefits are better performance (noticeable when there are a
-lot of matches) and improved flexibility: 'xref-match-item' instances
-do not require that 'location' inherits from 'xref-location' anymore
-(that class was removed), so packages can create new location types to
-use with "match items" without adding EIEIO as a dependency.
-
 
 * Editing Changes in Emacs 28.1
 
@@ -3724,6 +3710,20 @@ user option has been renamed to 
'find-library-source-path', and
 ---
 ** The macro 'vc-call' no longer evaluates its second argument twice.
 
+** Xref migrated from EIEIO to cl-defstruct for its core objects.
+This means that 'oref' and 'with-slots' no longer works on them, and
+'make-instance' can no longer be used to create those instances (which
+wasn't recommended anyway).  Packages should restrict themselves to
+using functions like 'xref-make', 'xref-make-match',
+'xref-make-*-location', as well as accessor functions
+'xref-item-summary' and 'xref-item-location'.
+
+Among the benefits are better performance (noticeable when there are a
+lot of matches) and improved flexibility: 'xref-match-item' instances
+do not require that 'location' inherits from 'xref-location' anymore
+(that class was removed), so packages can create new location types to
+use with "match items" without adding EIEIO as a dependency.
+
 
 * Lisp Changes in Emacs 28.1
 
diff --git a/src/charset.c b/src/charset.c
index 7cd0fa7..670fd48 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -63,7 +63,7 @@ Lisp_Object Vcharset_hash_table;
 /* Table of struct charset.  */
 struct charset *charset_table;
 int charset_table_size;
-static int charset_table_used;
+int charset_table_used;
 
 /* Special charsets corresponding to symbols.  */
 int charset_ascii;
diff --git a/src/charset.h b/src/charset.h
index 97122d8..8c53823 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -249,6 +249,7 @@ extern Lisp_Object Vcharset_hash_table;
 /* Table of struct charset.  */
 extern struct charset *charset_table;
 extern int charset_table_size;
+extern int charset_table_used;
 
 #define CHARSET_FROM_ID(id) (charset_table + (id))
 
diff --git a/src/pdumper.c b/src/pdumper.c
index c758bc8..8f03684 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3177,7 +3177,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
   DUMP_FIELD_COPY (&out, cs, hash_index);
   DUMP_FIELD_COPY (&out, cs, dimension);
   memcpy (out.code_space, &cs->code_space, sizeof (cs->code_space));
-  if (cs->code_space_mask)
+  if (cs_i < charset_table_used && cs->code_space_mask)
     dump_field_fixup_later (ctx, &out, cs, &cs->code_space_mask);
   DUMP_FIELD_COPY (&out, cs, code_linear_p);
   DUMP_FIELD_COPY (&out, cs, iso_chars_96);
@@ -3198,7 +3198,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
   memcpy (out.fast_map, &cs->fast_map, sizeof (cs->fast_map));
   DUMP_FIELD_COPY (&out, cs, code_offset);
   dump_off offset = dump_object_finish (ctx, &out, sizeof (out));
-  if (cs->code_space_mask)
+  if (cs_i < charset_table_used && cs->code_space_mask)
     dump_remember_cold_op (ctx, COLD_OP_CHARSET,
                            Fcons (dump_off_to_lisp (cs_i),
                                   dump_off_to_lisp (offset)));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]