texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/convert/call_conversion_perl.c (c


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/call_conversion_perl.c (call_converter_output): do not get output_files_information from the Perl converter if it is already in the C converter.
Date: Thu, 02 Jan 2025 12:32:40 -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 7f286f00f1 * tp/Texinfo/XS/convert/call_conversion_perl.c 
(call_converter_output): do not get output_files_information from the Perl 
converter if it is already in the C converter.
7f286f00f1 is described below

commit 7f286f00f10f646f9b41c5d78fe12b3e920a845c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 2 18:32:41 2025 +0100

    * tp/Texinfo/XS/convert/call_conversion_perl.c
    (call_converter_output): do not get output_files_information from the
    Perl converter if it is already in the C converter.
---
 ChangeLog                                    |  6 ++++++
 tp/Texinfo/XS/convert/call_conversion_perl.c | 13 ++++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 162538001e..584c405f62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-01-02  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/call_conversion_perl.c
+       (call_converter_output): do not get output_files_information from the
+       Perl converter if it is already in the C converter.
+
 2025-01-02  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/texinfo.c (txi_converter_output): allow
diff --git a/tp/Texinfo/XS/convert/call_conversion_perl.c 
b/tp/Texinfo/XS/convert/call_conversion_perl.c
index 9599ea651b..b9d1ab8a8d 100644
--- a/tp/Texinfo/XS/convert/call_conversion_perl.c
+++ b/tp/Texinfo/XS/convert/call_conversion_perl.c
@@ -219,9 +219,9 @@ call_convert_converter (const char *module_name,
   return result;
 }
 
-/* call both converter->output and converter->output_files_information and
-   return an OUTPUT_TEXT_FILES_INFO which contains both the resulting text
-   and the output files information. */
+/* call converter->output and converter->output_files_information if needed
+   and return an OUTPUT_TEXT_FILES_INFO which contains both the resulting text
+   and the output files information, if not already in the converter. */
 /* FIXME it would probably be better to be able to keep the converter
    SV to keep the blessing information instead of needing the module name */
 OUTPUT_TEXT_FILES_INFO *
@@ -274,12 +274,19 @@ call_converter_output (const char *module_name, CONVERTER 
*self,
   result_sv = POPs;
   result_ret = SvPVutf8 (result_sv, len);
   result->text = non_perl_strndup (result_ret, len);
+  result->output_files_information = 0;
 
   PUTBACK;
 
   FREETMPS;
   LEAVE;
 
+  /* already set in the converter, no need to get from Perl.
+     Case of converters implemented in C, for instance HTML */
+  if (self->output_files_information.opened_files.number > 0
+      || self->output_files_information.unclosed_files.number > 0)
+    return result;
+
   ENTER;
   SAVETMPS;
 



reply via email to

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