changeset 5777:ccaa851ae712

Rework description of no_conversion coding system, avoiding pdump confusion. src/ChangeLog addition: 2014-01-16 Aidan Kehoe <kehoea@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.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 16 Jan 2014 19:56:06 +0000
parents 65d65b52d608
children 319e18d08654
files src/ChangeLog src/file-coding.c
diffstat 2 files changed, 20 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- 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@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@parhasard.net>
 
 	Pass character count information from the no-conversion and
--- 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);