[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Common.pm (import): List overrided p
From: |
Gavin D. Smith |
Subject: |
branch master updated: * tp/Texinfo/Common.pm (import): List overrided perl subroutines in a hash for more concise code. |
Date: |
Sat, 04 Nov 2023 07:57:52 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 6a6f3f9f48 * tp/Texinfo/Common.pm (import): List overrided perl
subroutines in a hash for more concise code.
6a6f3f9f48 is described below
commit 6a6f3f9f48abf897177f3e8128d28f6b7bdecbc0
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Nov 4 11:57:45 2023 +0000
* tp/Texinfo/Common.pm (import): List overrided perl subroutines
in a hash for more concise code.
---
ChangeLog | 5 +++++
tp/Texinfo/Common.pm | 46 ++++++++++++++++++++--------------------------
2 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1987470ed5..8c54a6259a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-11-04 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * tp/Texinfo/Common.pm (import): List overrided perl subroutines
+ in a hash for more concise code.
+
2023-11-04 Gavin Smith <gavinsmith0123@gmail.com>
* info/scan.c (write_tag_contents): Check if added text is of
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index bd58463843..221b64aff3 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -78,37 +78,31 @@ __ __p
$VERSION = '7.1dev';
+our %XS_overrides = (
+ "Texinfo::Common::set_document_options"
+ => "Texinfo::StructTransf::set_document_options",
+ "Texinfo::Common::copy_tree"
+ => "Texinfo::StructTransf::copy_tree",
+ "Texinfo::Common::relate_index_entries_to_table_items_in_tree"
+ => "Texinfo::StructTransf::relate_index_entries_to_table_items_in_tree",
+ "Texinfo::Common::move_index_entries_after_items_in_tree"
+ => "Texinfo::StructTransf::move_index_entries_after_items_in_tree",
+ "Texinfo::Common::protect_colon_in_tree"
+ => "Texinfo::StructTransf::protect_colon_in_tree",
+ "Texinfo::Common::protect_comma_in_tree"
+ => "Texinfo::StructTransf::protect_comma_in_tree",
+ "Texinfo::Common::protect_node_after_label_in_tree"
+ => "Texinfo::StructTransf::protect_node_after_label_in_tree"
+);
+
our $module_loaded = 0;
sub import {
if (!$module_loaded) {
if (!defined $ENV{TEXINFO_XS_PARSER}
or $ENV{TEXINFO_XS_PARSER} eq '1') {
- Texinfo::XSLoader::override(
- "Texinfo::Common::set_document_options",
- "Texinfo::StructTransf::set_document_options");
- Texinfo::XSLoader::override(
- "Texinfo::Common::copy_tree",
- "Texinfo::StructTransf::copy_tree");
- Texinfo::XSLoader::override(
- "Texinfo::Common::relate_index_entries_to_table_items_in_tree",
- "Texinfo::StructTransf::relate_index_entries_to_table_items_in_tree"
- );
- Texinfo::XSLoader::override(
- "Texinfo::Common::move_index_entries_after_items_in_tree",
- "Texinfo::StructTransf::move_index_entries_after_items_in_tree"
- );
- Texinfo::XSLoader::override(
- "Texinfo::Common::protect_colon_in_tree",
- "Texinfo::StructTransf::protect_colon_in_tree"
- );
- Texinfo::XSLoader::override(
- "Texinfo::Common::protect_comma_in_tree",
- "Texinfo::StructTransf::protect_comma_in_tree"
- );
- Texinfo::XSLoader::override(
- "Texinfo::Common::protect_node_after_label_in_tree",
- "Texinfo::StructTransf::protect_node_after_label_in_tree"
- );
+ for my $sub (keys %XS_overrides) {
+ Texinfo::XSLoader::override ($sub, $XS_overrides{$sub});
+ }
}
$module_loaded = 1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Common.pm (import): List overrided perl subroutines in a hash for more concise code.,
Gavin D. Smith <=