texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sat, 25 May 2024 04:03:31 -0400 (EDT)

branch: master
commit 820a88407ffe32a59a781370b2b93c3ee7f386ed
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat May 25 10:03:18 2024 +0200

    * tp/Texinfo/XS/convert/convert_html.c (html_id_is_registered)
    (html_register_id, html_converter_initialize, html_reset_converter)
    (html_free_converter), tp/Texinfo/XS/main/converter_types.h
    (CONVERTER): make registered_ids a pointer in CONVERTER, to have only
    pointers in the registered ids union.
---
 ChangeLog                            |  8 ++++++++
 tp/Texinfo/XS/convert/convert_html.c | 11 +++++++----
 tp/Texinfo/XS/main/converter_types.h |  2 +-
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f29abbd2fb..ab40262f07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-25  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/convert_html.c (html_id_is_registered)
+       (html_register_id, html_converter_initialize, html_reset_converter)
+       (html_free_converter), tp/Texinfo/XS/main/converter_types.h
+       (CONVERTER): make registered_ids a pointer in CONVERTER, to have only
+       pointers in the registered ids union.
+
 2024-05-25  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/converter_types.h (CONVERTER): rename seen_ids as
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index 664ed46e47..801d7952d1 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -290,7 +290,7 @@ html_id_is_registered (CONVERTER *self, const char *string)
 #ifdef USE_PERL_HASHMAP
   return is_hv_registered_id (self, string);
 #else
-  return find_string (&self->registered_ids, string);
+  return find_string (self->registered_ids, string);
 #endif
 }
 
@@ -300,7 +300,7 @@ html_register_id (CONVERTER *self, const char *string)
 #ifdef USE_PERL_HASHMAP
   hv_register_id (self, string);
 #else
-  add_string (string, &self->registered_ids);
+  add_string (string, self->registered_ids);
 #endif
 }
 
@@ -16440,6 +16440,8 @@ html_converter_initialize (CONVERTER *self)
 
 #ifdef USE_PERL_HASHMAP
   init_registered_ids_hv (self);
+#else
+  self->registered_ids = new_string_list ();
 #endif
 
   /* initialization needing some information from perl */
@@ -17127,7 +17129,7 @@ html_reset_converter (CONVERTER *self)
 #ifdef USE_PERL_HASHMAP
   clear_registered_ids_hv (self);
 #else
-  clear_strings_list (&self->registered_ids);
+  clear_strings_list (self->registered_ids);
 #endif
   for (i = 0; i < ST_footnote_location+1; i++)
     {
@@ -17315,7 +17317,8 @@ html_free_converter (CONVERTER *self)
 #ifdef USE_PERL_HASHMAP
   free_registered_ids_hv (self);
 #else
-  free_strings_list (&self->registered_ids);
+  destroy_strings_list (self->registered_ids);
+  self->registered_ids = 0;
 #endif
 
   html_free_files_source_info (&self->files_source_info);
diff --git a/tp/Texinfo/XS/main/converter_types.h 
b/tp/Texinfo/XS/main/converter_types.h
index aebd9fd5ad..05e6ca80e1 100644
--- a/tp/Texinfo/XS/main/converter_types.h
+++ b/tp/Texinfo/XS/main/converter_types.h
@@ -776,7 +776,7 @@ typedef struct CONVERTER {
     ELEMENT **special_unit_info_tree[SUIT_type_heading+1];
     SORTED_INDEX_NAMES sorted_index_names;
     union {
-      STRING_LIST registered_ids;
+      STRING_LIST *registered_ids;
       /* actually HV * but we do not want to drag in Perl headers */
       void *registered_ids_hv;
     };



reply via email to

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