texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/texi2any.pl: do not rebuild the perl documen


From: Patrice Dumas
Subject: branch master updated: * tp/texi2any.pl: do not rebuild the perl document/tree before calling convert_to_texinfo for MACRO_EXPAND if TEXINFO_XS_CONVERT is set.
Date: Mon, 30 Oct 2023 07:37:31 -0400

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 fabd428686 * tp/texi2any.pl: do not rebuild the perl document/tree 
before calling convert_to_texinfo for MACRO_EXPAND if TEXINFO_XS_CONVERT is set.
fabd428686 is described below

commit fabd42868690c3fd470e1575cd8853c09b3adbcb
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Oct 30 13:37:34 2023 +0100

    * tp/texi2any.pl: do not rebuild the perl document/tree before calling
    convert_to_texinfo for MACRO_EXPAND if TEXINFO_XS_CONVERT is set.
---
 ChangeLog      | 5 +++++
 tp/texi2any.pl | 8 ++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d37e9baf03..2f5891f09b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-30  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/texi2any.pl: do not rebuild the perl document/tree before calling
+       convert_to_texinfo for MACRO_EXPAND if TEXINFO_XS_CONVERT is set.
+
 2023-10-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units, convert)
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index c66a3cd630..f1f7eecff7 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1511,8 +1511,12 @@ while(@input_files) {
 
   if (defined(get_conf('MACRO_EXPAND')) and $file_number == 0) {
     require Texinfo::Convert::Texinfo;
-    $document = Texinfo::Structuring::rebuild_document($document);
-    $tree = $document->tree();
+    # no need to rebuild the tree here if convert_to_texinfo is XS code.
+    if (not (defined $ENV{TEXINFO_XS_CONVERT}
+             and $ENV{TEXINFO_XS_CONVERT} eq '1')) {
+      $document = Texinfo::Structuring::rebuild_document($document);
+      $tree = $document->tree();
+    }
     my $texinfo_text = Texinfo::Convert::Texinfo::convert_to_texinfo($tree);
     #print STDERR "$texinfo_text\n";
     my $encoded_macro_expand_file_name = get_conf('MACRO_EXPAND');



reply via email to

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