texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/HTML.pm (current_filename):


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/HTML.pm (current_filename): set $self.
Date: Thu, 15 Feb 2024 15:38:01 -0500

This is an automated email from the git hooks/post-receive script.

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 6c6f0bf47b * tp/Texinfo/Convert/HTML.pm (current_filename): set $self.
6c6f0bf47b is described below

commit 6c6f0bf47bc05f8c1f83df44a54dec017112b39b
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Feb 15 21:37:52 2024 +0100

    * tp/Texinfo/Convert/HTML.pm (current_filename): set $self.
    
    * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides),
    tp/Texinfo/XS/convert/ConvertXS.xs (html_current_filename): add XS
    override for current_filename.
---
 ChangeLog                          |  8 ++++++++
 tp/Texinfo/Convert/HTML.pm         |  5 ++++-
 tp/Texinfo/XS/convert/ConvertXS.xs | 13 +++++++++++--
 3 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ff59e42383..87d8280eb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-15  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/HTML.pm (current_filename): set $self.
+
+       * tp/Texinfo/Convert/HTML.pm (%XS_conversion_overrides),
+       tp/Texinfo/XS/convert/ConvertXS.xs (html_current_filename): add XS
+       override for current_filename.
+
 2024-02-15  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (current_filename)
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index b482c5b817..06aa6b309c 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -217,6 +217,8 @@ my %XS_conversion_overrides = (
    => "Texinfo::Convert::ConvertXS::html_preformatted_classes_stack",
   "Texinfo::Convert::HTML::in_align"
    => "Texinfo::Convert::ConvertXS::html_in_align",
+  "Texinfo::Convert::HTML::current_filename"
+    => "Texinfo::Convert::ConvertXS::html_current_filename",
 
   "Texinfo::Convert::HTML::count_elements_in_filename"
    => "Texinfo::Convert::ConvertXS::html_count_elements_in_filename",
@@ -1568,7 +1570,7 @@ foreach my $no_number_type ('text', 'string') {
 # are about external nodes not found.
 #
 # $self->{'current_output_unit'} undef happens at least when there is no
-# output file  That call would result for instance from from_element_direction
+# output file.  That call would result for instance from from_element_direction
 # being called from _get_links, itself called from 'format_begin_file'.
 # TODO are there other cases?
 sub from_element_direction($$$;$$$)
@@ -2296,6 +2298,7 @@ sub get_file_information($$;$)
 
 sub current_filename($)
 {
+  my $self = shift;
   return $self->{'current_filename'};
 }
 
diff --git a/tp/Texinfo/XS/convert/ConvertXS.xs 
b/tp/Texinfo/XS/convert/ConvertXS.xs
index 03992db51c..4a779ddc58 100644
--- a/tp/Texinfo/XS/convert/ConvertXS.xs
+++ b/tp/Texinfo/XS/convert/ConvertXS.xs
@@ -814,13 +814,22 @@ html_in_align (SV *converter_in)
          CONVERTER *self;
          enum command_id cmd;
      CODE:
-         self = get_sv_converter (converter_in,
-                                  "html_in_align");
+         self = get_sv_converter (converter_in, "html_in_align");
          cmd = html_in_align (self);
          RETVAL = builtin_command_name (cmd);
     OUTPUT:
          RETVAL
 
+const char *
+html_current_filename (SV *converter_in)
+     PREINIT:
+         CONVERTER *self;
+     CODE:
+         self = get_sv_converter (converter_in, "html_current_filename");
+         RETVAL = self->current_filename.filename;
+    OUTPUT:
+         RETVAL
+
 SV *
 html_count_elements_in_filename (SV *converter_in, char *spec, filename)
          char *filename = (char *)SvPVutf8_nolen($arg);



reply via email to

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