[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/Document.pm (indices_sort_strings),
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/Document.pm (indices_sort_strings), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove prefer_reference_element argument, as the result is cached, therefore the first call prefer_reference_element argument only would be used. Also the possibility associated to that argument probably do not make much sense when doing a document indices_sort_strings. |
Date: |
Fri, 08 Mar 2024 18:18:37 -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 76ff499158 * tp/Texinfo/Document.pm (indices_sort_strings),
tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings),
tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove
prefer_reference_element argument, as the result is cached, therefore the first
call prefer_reference_element argument only would be used. Also the
possibility associated to that argument probably do not make much sense when
doing a document indices_sort_strings.
76ff499158 is described below
commit 76ff499158ae42ef25d49ce87ebf4c98a79d3d87
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Mar 9 00:18:40 2024 +0100
* tp/Texinfo/Document.pm (indices_sort_strings),
tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings),
tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove
prefer_reference_element argument, as the result is cached, therefore
the first call prefer_reference_element argument only would be
used. Also the possibility associated to that argument probably do
not make much sense when doing a document indices_sort_strings.
---
ChangeLog | 10 ++++++++++
tp/Texinfo/Document.pm | 7 +++----
tp/Texinfo/Indices.pm | 2 +-
tp/Texinfo/XS/main/DocumentXS.xs | 10 +++-------
tp/Texinfo/XS/main/document.c | 5 ++---
tp/Texinfo/XS/main/document.h | 2 +-
tp/Texinfo/XS/main/manipulate_indices.c | 2 +-
7 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8015623b83..baf5e6a2ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-03-08 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/Document.pm (indices_sort_strings),
+ tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings),
+ tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove
+ prefer_reference_element argument, as the result is cached, therefore
+ the first call prefer_reference_element argument only would be
+ used. Also the possibility associated to that argument probably do
+ not make much sense when doing a document indices_sort_strings.
+
2024-03-08 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units)
diff --git a/tp/Texinfo/Document.pm b/tp/Texinfo/Document.pm
index 1ed2f2e86b..c92f4f9217 100644
--- a/tp/Texinfo/Document.pm
+++ b/tp/Texinfo/Document.pm
@@ -220,18 +220,17 @@ sub merged_indices($)
# In general, it is not needed to call that function directly,
# as it is called by Texinfo::Indices::sort_indices_by_*. It may
# be called in advance, however, if errors need to be collected early.
-sub indices_sort_strings($$;$)
+sub indices_sort_strings($$)
{
my $document = shift;
my $customization_information = shift;
- my $prefer_reference_element = shift;
if (!$document->{'index_entries_sort_strings'}) {
my $indices_sort_strings
= Texinfo::Indices::setup_index_entries_sort_strings
($document->{'registrar'}, $customization_information,
- $document->merged_indices(), $document->indices_information(),
- $prefer_reference_element);
+ $document->merged_indices(),
+ $document->indices_information(), 0);
$document->{'index_entries_sort_strings'} = $indices_sort_strings;
}
diff --git a/tp/Texinfo/Indices.pm b/tp/Texinfo/Indices.pm
index 8dfe04e800..94a3380863 100644
--- a/tp/Texinfo/Indices.pm
+++ b/tp/Texinfo/Indices.pm
@@ -475,7 +475,7 @@ sub _setup_sort_sortable_strings_collator($$$$$)
# simple wrapper around setup_index_entries_sort_strings that caches the
# result
my $indices_sort_strings = Texinfo::Document::indices_sort_strings($document,
- $registrar, $customization_information);
+ $customization_information);
my $collator = _setup_collator($use_unicode_collation, $locale_lang);
diff --git a/tp/Texinfo/XS/main/DocumentXS.xs b/tp/Texinfo/XS/main/DocumentXS.xs
index d6eccc8db4..288eb323a5 100644
--- a/tp/Texinfo/XS/main/DocumentXS.xs
+++ b/tp/Texinfo/XS/main/DocumentXS.xs
@@ -183,27 +183,23 @@ set_document_global_info (SV *document_in, char *key, SV
*value_sv)
}
}
-# customization_information, prefer_reference_element
+# customization_information
SV *
indices_sort_strings (SV *document_in, ...)
- PROTOTYPE: $$;$
+ PROTOTYPE: $$
PREINIT:
DOCUMENT *document = 0;
const INDICES_SORT_STRINGS *indices_sort_strings = 0;
HV *document_hv;
- int prefer_reference_element = 0;
SV *result_sv = 0;
const char *sort_strings_key = "index_entries_sort_strings";
CODE:
document = get_sv_document_document (document_in,
"indices_sort_strings");
- if (items > 2 && SvOK(ST(2)))
- prefer_reference_element = SvIV (ST(2));
-
if (document)
indices_sort_strings
= document_indices_sort_strings (document, document->error_messages,
- document->options, prefer_reference_element);
+ document->options);
document_hv = (HV *) SvRV (document_in);
diff --git a/tp/Texinfo/XS/main/document.c b/tp/Texinfo/XS/main/document.c
index 239f1c0d17..c01fad6885 100644
--- a/tp/Texinfo/XS/main/document.c
+++ b/tp/Texinfo/XS/main/document.c
@@ -162,7 +162,7 @@ register_document_convert_index_text_options (DOCUMENT
*document,
const INDICES_SORT_STRINGS *
document_indices_sort_strings (DOCUMENT *document,
ERROR_MESSAGE_LIST *error_messages,
- OPTIONS *options, int prefer_reference_element)
+ OPTIONS *options)
{
if (!document->indices_sort_strings)
{
@@ -171,8 +171,7 @@ document_indices_sort_strings (DOCUMENT *document,
document->indices_sort_strings
= setup_index_entries_sort_strings (error_messages, options,
- merged_indices, document->index_names,
- prefer_reference_element);
+ merged_indices, document->index_names, 0);
document->modified_information |= F_DOCM_indices_sort_strings;
}
diff --git a/tp/Texinfo/XS/main/document.h b/tp/Texinfo/XS/main/document.h
index 49612e5878..4fa0955f6c 100644
--- a/tp/Texinfo/XS/main/document.h
+++ b/tp/Texinfo/XS/main/document.h
@@ -34,7 +34,7 @@ const MERGED_INDICES *document_merged_indices (DOCUMENT
*document);
const INDICES_SORT_STRINGS *document_indices_sort_strings (
DOCUMENT *document,
ERROR_MESSAGE_LIST *error_messages,
- OPTIONS *options, int prefer_reference_element);
+ OPTIONS *options);
INDEX_SORTED_BY_INDEX *sorted_indices_by_index (DOCUMENT *document,
ERROR_MESSAGE_LIST *error_messages,
diff --git a/tp/Texinfo/XS/main/manipulate_indices.c
b/tp/Texinfo/XS/main/manipulate_indices.c
index 2f34c1ec61..93dac2fdcc 100644
--- a/tp/Texinfo/XS/main/manipulate_indices.c
+++ b/tp/Texinfo/XS/main/manipulate_indices.c
@@ -700,7 +700,7 @@ setup_sort_sortable_strings_collator (DOCUMENT *document,
INDICES_SORTABLE_ENTRIES *index_sortable_index_entries;
indices_sort_strings = document_indices_sort_strings (document,
- error_messages, options, 0);
+ error_messages, options);
*collator = setup_collator (use_unicode_collation, collation_language,
collation_locale, error_messages, options);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/Document.pm (indices_sort_strings), tp/Texinfo/XS/main/DocumentXS.xs (indices_sort_strings), tp/Texinfo/XS/main/document.c (document_indices_sort_strings): remove prefer_reference_element argument, as the result is cached, therefore the first call prefer_reference_element argument only would be used. Also the possibility associated to that argument probably do not make much sense when doing a document indices_sort_strings.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units) (_html_convert_convert, run_stage_handlers, _html_convert_output), tp/Texinfo/Structuring.pm (split_by_node, split_by_section) (_XS_unsplit, unsplit), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_convert, html_convert_output), tp/Texinfo/XS/main/output_unit.c (split_by_node, split_by_section) (unsplit), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_by_node, split_by_section, unsplit): pass a document instead of [...]
- Next by Date:
[no subject]
- Previous by thread:
branch master updated: * tp/Texinfo/Convert/HTML.pm (_prepare_conversion_units) (_html_convert_convert, run_stage_handlers, _html_convert_output), tp/Texinfo/Structuring.pm (split_by_node, split_by_section) (_XS_unsplit, unsplit), tp/Texinfo/XS/convert/ConvertXS.xs (html_convert_convert, html_convert_output), tp/Texinfo/XS/main/output_unit.c (split_by_node, split_by_section) (unsplit), tp/Texinfo/XS/structuring_transfo/StructuringTransfoXS.xs (split_by_node, split_by_section, unsplit): pass a document instead of [...]
- Next by thread:
master updated (76ff499158 -> 3d37341099)
- Index(es):