APPROVE COMMIT
The buildbot showed some problems with my last change, which turned out to
be a result of the pdump infrastructure being confused by the no-conversion
coding system’s zero-sized coding system data. Remove this, maintain the
coding_stream information.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1389902166 0
# Node ID ccaa851ae712e870ceb65d19226426d40d8de48c
# Parent 65d65b52d608ca1f17365a96fc3cf710a3af625c
Rework description of no_conversion coding system, avoiding pdump confusion.
src/ChangeLog addition:
2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
* file-coding.c:
* file-coding.c (struct no_conversion_coding_stream):
* file-coding.c (const struct sized_memory_description
no_conversion_coding_stream_description): Removed.
* file-coding.c (coding_system_type_create):
Remove structure and description for struct
no_conversion_coding_system, which confused pdump on some builds
after the last change.
diff -r 65d65b52d608 -r ccaa851ae712 src/ChangeLog
--- a/src/ChangeLog Thu Jan 16 16:27:52 2014 +0000
+++ b/src/ChangeLog Thu Jan 16 19:56:06 2014 +0000
@@ -1,3 +1,14 @@
+2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * file-coding.c:
+ * file-coding.c (struct no_conversion_coding_stream):
+ * file-coding.c (const struct sized_memory_description
+ no_conversion_coding_stream_description): Removed.
+ * file-coding.c (coding_system_type_create):
+ Remove structure and description for struct
+ no_conversion_coding_system, which confused pdump on some builds
+ after the last change.
+
2014-01-16 Aidan Kehoe <kehoea(a)parhasard.net>
Pass character count information from the no-conversion and
diff -r 65d65b52d608 -r ccaa851ae712 src/file-coding.c
--- a/src/file-coding.c Thu Jan 16 16:27:52 2014 +0000
+++ b/src/file-coding.c Thu Jan 16 19:56:06 2014 +0000
@@ -2832,31 +2832,13 @@
#### Shouldn't we _call_ it that, then? And while we're at it,
separate it into "to_internal" and "to_external"? */
-
-struct no_conversion_coding_system
-{
-};
-
struct no_conversion_coding_stream
{
/* Number of characters seen when decoding. */
Charcount characters_seen;
};
-static const struct memory_description no_conversion_coding_system_description[] = {
- { XD_END }
-};
-
-static const struct memory_description no_conversion_coding_stream_description_1 [] = {
- { XD_INT, offsetof (struct no_conversion_coding_stream, characters_seen) },
- { XD_END }
-};
-
-const struct sized_memory_description no_conversion_coding_stream_description = {
- sizeof (struct no_conversion_coding_stream), no_conversion_coding_stream_description_1
-};
-
-DEFINE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion);
+DEFINE_CODING_SYSTEM_TYPE (no_conversion);
/* This is used when reading in "binary" files -- i.e. files that may
contain all 256 possible byte values and that are not to be
@@ -4740,8 +4722,14 @@
dump_add_opaque_int (&coding_detector_count);
dump_add_opaque_int (&coding_detector_category_count);
- INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA (no_conversion,
- "no-conversion-coding-system-p");
+ INITIALIZE_CODING_SYSTEM_TYPE (no_conversion,
+ "no-conversion-coding-system-p");
+ /* This is the only coding system type that has coding_stream info but no
+ coding_system info, which is why we're not using
+ INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA. */
+ no_conversion_coding_system_methods->coding_data_size =
+ sizeof (struct no_conversion_coding_stream);
+
CODING_SYSTEM_HAS_METHOD (no_conversion, convert);
CODING_SYSTEM_HAS_METHOD (no_conversion, character_tell);
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches