texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Mon, 6 Nov 2023 02:58:15 -0500 (EST)

branch: master
commit 5665aa759696f7acba76809c331b22b2c4f27efc
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Nov 6 08:32:46 2023 +0100

    * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm:
    remove converter_options_for_output, use the converter directly in all
    calling functions.
---
 ChangeLog                            |  6 ++++++
 tp/Texinfo/Convert/Converter.pm      | 17 -----------------
 tp/Texinfo/Convert/HTML.pm           | 22 ++++++----------------
 tp/Texinfo/XS/convert/convert_html.c |  1 -
 4 files changed, 12 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3436100ec2..be7594f9da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-11-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Converter.pm, tp/Texinfo/Convert/HTML.pm:
+       remove converter_options_for_output, use the converter directly in all
+       calling functions.
+
 2023-11-05  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/convert_html.c (html_converter_initialize),
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 514ac7021b..2f294413af 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -453,23 +453,6 @@ sub output($$)
   return undef;
 }
 
-# FIXME remove, do in XS
-sub converter_options_for_output($)
-{
-  my $self = shift;
-
-  my $result = {'converter_descriptor' => $self->{'converter_descriptor'},
-                'conf' => $self->{'conf'},
-               };
-
-  if (defined($self->{'output_init_conf'})) {
-    $result->{'output_init_conf'} = $self->{'output_init_conf'};
-  }
-
-  return $result;
-}
-
-
 ###############################################################
 # Implementation of the customization API that is used in many
 # Texinfo modules
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index a5d1448a1a..6457180a22 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -2353,11 +2353,7 @@ sub _translate_names($)
   my $self = shift;
 
   if ($self->{'converter_descriptor'} and $XS_convert) {
-    my $selected_info
-             = {'converter_descriptor' => $self->{'converter_descriptor'},
-                'conf' => $self->{'conf'},
-               };
-    _XS_translate_names($selected_info);
+    _XS_translate_names($self);
     return;
   }
 
@@ -9406,11 +9402,10 @@ sub _prepare_conversion_units($$$)
   my ($output_units, $special_units, $associated_special_units);
 
   if ($self->{'converter_descriptor'} and $XS_convert) {
-    my $converter_info = $self->converter_options_for_output();
     my ($targets, $special_targets, $seen_ids);
     ($output_units, $special_units, $associated_special_units,
      $targets, $special_targets, $seen_ids)
-      = _XS_prepare_conversion_units($converter_info,
+      = _XS_prepare_conversion_units($self,
                                      $document_name);
     $self->{'targets'} = $targets;
     $self->{'special_targets'} = $special_targets;
@@ -9478,12 +9473,10 @@ sub _prepare_units_directions_files($$$$$$$$)
   my $document_name = shift;
 
   if ($self->{'converter_descriptor'} and $XS_convert) {
-    my $converter_info = $self->converter_options_for_output();
-
     my ($XS_files_source_info, $global_units_directions,
         $elements_in_file_count, $filenames,
         $file_counters, $out_filepaths)
-      = _XS_prepare_units_directions_files($converter_info,
+      = _XS_prepare_units_directions_files($self,
            $output_units, $special_units, $associated_special_units,
            $output_file, $destination_directory,
            $output_filename, $document_name);
@@ -11179,9 +11172,8 @@ sub convert($$)
   if ($self->{'converter_descriptor'} and $XS_convert) {
     # Do it preferentially in XS, and import to perl, to have data
     # setup in C for XS too.
-    $converter_info = $self->converter_options_for_output();
     my $global_units_directions =
-      _XS_prepare_output_units_global_targets($converter_info,
+      _XS_prepare_output_units_global_targets($self,
            $output_units, $special_units, $associated_special_units);
     $self->{'global_units_directions'} = $global_units_directions;
   } else {
@@ -11218,7 +11210,7 @@ sub convert($$)
   $self->{'current_filename'} = '';
 
   if ($self->{'converter_descriptor'} and $XS_convert) {
-    my $XS_result = _XS_html_convert_convert ($converter_info, $root,
+    my $XS_result = _XS_html_convert_convert ($self, $root,
                                               $output_units, $special_units);
     $self->_finalize_output_state();
     return $XS_result;
@@ -11505,10 +11497,8 @@ sub _html_convert_output($$$$$$$$)
       $destination_directory, $output_filename, $document_name) = @_;
 
   if ($self->{'converter_descriptor'} and $XS_convert) {
-    my $converter_info = $self->converter_options_for_output();
-
     my $XS_text_output
-           = _XS_html_convert_output ($converter_info,
+           = _XS_html_convert_output ($self,
                      $root, $output_units, $special_units, $output_file,
                      $destination_directory, $output_filename,
                      $document_name);
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index 5a5aabc840..9158356ce7 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -2431,7 +2431,6 @@ html_converter_initialize (CONVERTER *self)
       self->varieties_direction_index[i] = 0;
    }
 
-
   /* note that we allocate the same size as no_arg_formatted_cmd
      even though in general there are much less translated commands,
      for simplicity */



reply via email to

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