texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Wed, 2 Oct 2024 06:05:15 -0400 (EDT)

branch: master
commit 83645ee381eb437d1eeda9dfb1f9305467c1f056
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Jul 30 19:01:29 2024 +0200

    * tp/Texinfo/Convert/HTML.pm (converter_initialize): call
    GNUT_get_direction_string_info only once.
    
    * tp/Texinfo/Convert/HTML.pm (converter_initialize),
    tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv),
    tp/Texinfo/XS/convert/get_html_perl_info.c
    (html_converter_initialize_sv): get customized_direction_strings
    through the call of html_converter_initialize_sv, not from the
    Perl converter state.
---
 ChangeLog                                  | 12 ++++++++++++
 tp/Texinfo/Convert/HTML.pm                 |  6 +++---
 tp/Texinfo/XS/convert/ConvertXS.xs         |  5 +++--
 tp/Texinfo/XS/convert/get_html_perl_info.c |  7 +++----
 tp/Texinfo/XS/convert/get_html_perl_info.h |  1 +
 5 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 93867b8449..4d2a7fcd22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,18 @@
        (converter_initialize): readd converter_initialize that was mistakenly
        removed.
 
+2024-07-30  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (converter_initialize): call
+       GNUT_get_direction_string_info only once.
+
+       * tp/Texinfo/Convert/HTML.pm (converter_initialize),
+       tp/Texinfo/XS/convert/ConvertXS.xs (html_converter_initialize_sv),
+       tp/Texinfo/XS/convert/get_html_perl_info.c
+       (html_converter_initialize_sv): get customized_direction_strings
+       through the call of html_converter_initialize_sv, not from the
+       Perl converter state.
+
 2024-07-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 9d8f7b175e..851c082195 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -8738,7 +8738,7 @@ my %special_characters = (
   'non_breaking_space' => [$xml_named_entity_nbsp, '00A0'],
 );
 
-sub _XS_html_converter_initialize($$$$$$$$$$$$$$)
+sub _XS_html_converter_initialize($$$$$$$$$$$$$$$)
 {
 }
 
@@ -9057,8 +9057,7 @@ sub converter_initialize($)
 
   # the customization information are not used further here, as
   # substitute_html_non_breaking_space is used and it depends on the document
-  $self->{'customized_direction_strings'}
-      = Texinfo::Config::GNUT_get_direction_string_info();
+  $self->{'customized_direction_strings'} = $customized_direction_strings;
 
   $self->{'stage_handlers'} = Texinfo::Config::GNUT_get_stage_handlers();
 
@@ -9139,6 +9138,7 @@ sub converter_initialize($)
                              \%defaults_format_special_unit_body_contents,
                              $customized_upper_case_commands,
                              $customized_special_unit_info,
+                             $customized_direction_strings,
                              \%default_converted_directions_strings
                             );
     delete $self->{'sorted_special_unit_varieties'};
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 01c5e6345d..6d36dc5b5a 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -579,7 +579,7 @@ void
 html_format_setup ()
 
 void
-html_converter_initialize_sv (SV *converter_in, SV 
*default_formatting_references, SV *default_css_string_formatting_references, 
SV *default_commands_open, SV *default_commands_conversion, SV 
*default_css_string_commands_conversion, SV *default_types_open, SV 
*default_types_conversion, SV *default_css_string_types_conversion, SV 
*default_output_units_conversion, SV *default_special_unit_body, SV 
*customized_upper_case_commands, SV *customized_special_unit_info, SV 
*default_converted_dire [...]
+html_converter_initialize_sv (SV *converter_in, SV 
*default_formatting_references, SV *default_css_string_formatting_references, 
SV *default_commands_open, SV *default_commands_conversion, SV 
*default_css_string_commands_conversion, SV *default_types_open, SV 
*default_types_conversion, SV *default_css_string_types_conversion, SV 
*default_output_units_conversion, SV *default_special_unit_body, SV 
*customized_upper_case_commands, SV *customized_special_unit_info, SV 
*customized_direction_s [...]
       PREINIT:
         CONVERTER *self;
       CODE:
@@ -588,7 +588,7 @@ html_converter_initialize_sv (SV *converter_in, SV 
*default_formatting_reference
          /* initialize first the special unit info, as the special unit
             directions are needed for the remainder of initialization.
             Therefore special unit Perl customization needs to be read
-            and splecial unit initialization in C code needs to be run
+            and special unit initialization in C code needs to be run
             too before doing the remaining */
          html_converter_init_special_unit_sv (converter_in,
                                               customized_special_unit_info);
@@ -605,6 +605,7 @@ html_converter_initialize_sv (SV *converter_in, SV 
*default_formatting_reference
                           default_output_units_conversion,
                           default_special_unit_body,
                           customized_upper_case_commands,
+                          customized_direction_strings,
                           default_converted_directions_strings);
 
 
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c 
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 682922a866..af6ade4b12 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -226,6 +226,7 @@ html_converter_initialize_sv (SV *converter_sv,
                               SV *default_output_units_conversion,
                               SV *default_special_unit_body,
                               SV *customized_upper_case_commands,
+                              SV *customized_direction_strings,
                               SV *default_converted_directions_strings
                              )
 {
@@ -256,7 +257,6 @@ html_converter_initialize_sv (SV *converter_sv,
   SV **code_types_sv;
   SV **pre_class_types_sv;
   SV **translated_direction_strings_sv;
-  SV **customized_direction_strings_sv;
   HV *formatting_function_hv;
   HV *commands_open_hv;
   HV *commands_conversion_hv;
@@ -1143,11 +1143,10 @@ html_converter_initialize_sv (SV *converter_sv,
         }
     }
 
-  FETCH(customized_direction_strings)
-  if (customized_direction_strings_sv)
+  if (customized_direction_strings && SvOK (customized_direction_strings))
     {
       HV *customized_direction_strings_hv
-        = (HV *) SvRV (*customized_direction_strings_sv);
+        = (HV *) SvRV (customized_direction_strings);
 
       for (DS_type = TDS_TRANSLATED_MAX_NR;
            DS_type < TDS_TYPE_MAX_NR; DS_type++)
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.h 
b/tp/Texinfo/XS/convert/get_html_perl_info.h
index 4be91621a3..2e577e2343 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.h
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.h
@@ -23,6 +23,7 @@ void html_converter_initialize_sv (SV *converter_sv,
                                   SV *default_output_units_conversion,
                                   SV *default_special_unit_body,
                                   SV *customized_upper_case_commands,
+                                  SV *customized_direction_strings,
                                   SV *default_converted_directions_strings
                                   );
 



reply via email to

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