[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Structuring.pm (%XS_overrides, %XS_c
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Structuring.pm (%XS_overrides, %XS_convert_overrides) ($XS_convert, import): override index_entry_element_sort_string and setup_index_entry_keys_formatting only if XS is used for conversion. |
Date: |
Thu, 11 Jan 2024 09:45:31 -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 967e7ae2d0 * tp/Texinfo/Structuring.pm (%XS_overrides,
%XS_convert_overrides) ($XS_convert, import): override
index_entry_element_sort_string and setup_index_entry_keys_formatting only if
XS is used for conversion.
967e7ae2d0 is described below
commit 967e7ae2d018edac2c736b5e963165f1f87a71e4
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jan 11 15:45:26 2024 +0100
* tp/Texinfo/Structuring.pm (%XS_overrides, %XS_convert_overrides)
($XS_convert, import): override index_entry_element_sort_string and
setup_index_entry_keys_formatting only if XS is used for conversion.
---
ChangeLog | 6 ++++++
tp/Texinfo/Structuring.pm | 16 +++++++++++++++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 1e337438a8..199068b2a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-11 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Structuring.pm (%XS_overrides, %XS_convert_overrides)
+ ($XS_convert, import): override index_entry_element_sort_string and
+ setup_index_entry_keys_formatting only if XS is used for conversion.
+
2024-01-10 Patrice Dumas <pertusus@free.fr>
* doc/texinfo.texi b/doc/texinfo.texi (@code{@@link}): add a missing
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 8d1bbac0da..dde6da31b7 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -92,7 +92,12 @@ my $XS_structuring = ((not defined($ENV{TEXINFO_XS})
and (not defined($ENV{TEXINFO_XS_STRUCTURE})
or $ENV{TEXINFO_XS_STRUCTURE} ne '0'));
-our %XS_overrides = (
+my $XS_convert = 0;
+$XS_convert = 1 if ($XS_structuring
+ and defined $ENV{TEXINFO_XS_CONVERT}
+ and $ENV{TEXINFO_XS_CONVERT} eq '1');
+
+my %XS_overrides = (
"Texinfo::Structuring::associate_internal_references"
=> "Texinfo::StructTransfXS::associate_internal_references",
"Texinfo::Structuring::sectioning_structure"
@@ -113,6 +118,10 @@ our %XS_overrides = (
=> "Texinfo::StructTransfXS::rebuild_output_units",
"Texinfo::Structuring::_XS_unsplit"
=> "Texinfo::StructTransfXS::unsplit",
+);
+
+# used in conversion only, and should only be loaded with XS converters
+my %XS_convert_overrides = (
"Texinfo::Structuring::index_entry_element_sort_string"
=> "Texinfo::StructTransfXS::index_entry_element_sort_string",
@@ -138,6 +147,11 @@ sub import {
Texinfo::XSLoader::override ($sub, $XS_overrides{$sub});
}
}
+ if ($XS_convert) {
+ for my $sub (keys %XS_convert_overrides) {
+ Texinfo::XSLoader::override ($sub, $XS_convert_overrides{$sub});
+ }
+ }
$module_loaded = 1;
}
# The usual import method
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Structuring.pm (%XS_overrides, %XS_convert_overrides) ($XS_convert, import): override index_entry_element_sort_string and setup_index_entry_keys_formatting only if XS is used for conversion.,
Patrice Dumas <=