[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Fri, 8 Dec 2023 07:06:54 -0500 (EST) |
branch: master
commit 4ba20f3a64c4fccec97fdad662cc73c55afcc5ac
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 8 12:57:38 2023 +0100
* tp/Texinfo/XS/convert/call_html_perl_function.c (call_types_open):
call build_tree_to_build only if not exiting immediately.
* tp/Texinfo/Convert/Converter.pm (import, %XS_overrides): use a hash
for XS overrides.
---
ChangeLog | 8 ++++++++
tp/Texinfo/Convert/Converter.pm | 22 +++++++++++++---------
tp/Texinfo/XS/convert/call_html_perl_function.c | 4 ++--
3 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6b62e3e495..4fac840d88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-12-08 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/call_html_perl_function.c (call_types_open):
+ call build_tree_to_build only if not exiting immediately.
+
+ * tp/Texinfo/Convert/Converter.pm (import, %XS_overrides): use a hash
+ for XS overrides.
+
2023-12-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/convert/convert_html.c (nav_panel_array)
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 98c58fe97a..327df71550 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -83,18 +83,22 @@ $XS_convert = 1 if ($XS_structuring
and $ENV{TEXINFO_XS_CONVERT} eq '1');
our $module_loaded = 0;
+
+my %XS_overrides = (
+ "Texinfo::Convert::Converter::_XS_set_conf"
+ => "Texinfo::Convert::ConvertXS::set_conf",
+ "Texinfo::Convert::Converter::_XS_get_unclosed_stream"
+ => "Texinfo::Convert::ConvertXS::get_unclosed_stream",
+ "Texinfo::Convert::Converter::destroy"
+ => "Texinfo::Convert::ConvertXS::destroy",
+);
+
sub import {
if (!$module_loaded) {
if ($XS_convert) {
- Texinfo::XSLoader::override(
- "Texinfo::Convert::Converter::_XS_set_conf",
- "Texinfo::Convert::ConvertXS::set_conf");
- Texinfo::XSLoader::override(
- "Texinfo::Convert::Converter::_XS_get_unclosed_stream",
- "Texinfo::Convert::ConvertXS::get_unclosed_stream");
- Texinfo::XSLoader::override(
- "Texinfo::Convert::Converter::destroy",
- "Texinfo::Convert::ConvertXS::destroy");
+ foreach my $sub (keys %XS_overrides) {
+ Texinfo::XSLoader::override ($sub, $XS_overrides{$sub});
+ }
}
$module_loaded = 1;
diff --git a/tp/Texinfo/XS/convert/call_html_perl_function.c
b/tp/Texinfo/XS/convert/call_html_perl_function.c
index 93a6526742..4182000d2c 100644
--- a/tp/Texinfo/XS/convert/call_html_perl_function.c
+++ b/tp/Texinfo/XS/convert/call_html_perl_function.c
@@ -1797,11 +1797,11 @@ call_types_open (CONVERTER *self, const enum
element_type type,
dTHX;
- build_tree_to_build (&self->tree_to_build);
-
if (!self->hv)
return;
+ build_tree_to_build (&self->tree_to_build);
+
formatting_reference_sv = self->types_open[type].sv_reference;
if (self->modified_state)