[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/parsetexi/input.c (next_text): af
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/parsetexi/input.c (next_text): after calling input_push_text for delcomment, set the input pointer again as the input stack may have been reallocated. |
Date: |
Tue, 07 Feb 2023 16:52:14 -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 618f3bdd6f * tp/Texinfo/XS/parsetexi/input.c (next_text): after
calling input_push_text for delcomment, set the input pointer again as the
input stack may have been reallocated.
618f3bdd6f is described below
commit 618f3bdd6f6f863d31142216ec538f744f7eae9a
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Feb 7 22:52:03 2023 +0100
* tp/Texinfo/XS/parsetexi/input.c (next_text): after calling
input_push_text for delcomment, set the input pointer again as the
input stack may have been reallocated.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/parsetexi/input.c | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b66f7c828b..ffdb18437f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-02-07 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/input.c (next_text): after calling
+ input_push_text for delcomment, set the input pointer again as the
+ input stack may have been reallocated.
+
2023-02-07 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/ParserNonXS.pm (_next_text),
diff --git a/tp/Texinfo/XS/parsetexi/input.c b/tp/Texinfo/XS/parsetexi/input.c
index 5a202da0ac..401325e937 100644
--- a/tp/Texinfo/XS/parsetexi/input.c
+++ b/tp/Texinfo/XS/parsetexi/input.c
@@ -461,6 +461,12 @@ next_text (ELEMENT *current)
source_mark->line = 0;
input_push_text(strdup (""),
input->source_info.line_nr, 0, 0);
+ /* if the input_stack was reallocated in input_push_text,
+ the input pointer for the file may have been freed and
+ re-created at another address. Therefore we reset it.
+ input_number has been increased too, so the input file
+ being processed is now at input_number - 2 */
+ input = &input_stack[input_number - 2];
set_input_source_mark (source_mark);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/parsetexi/input.c (next_text): after calling input_push_text for delcomment, set the input pointer again as the input stack may have been reallocated.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_next_text), tp/Texinfo/XS/parsetexi/input.c (next_text): reuse input source mark for delcomment. Do not pass line from input source mark to the other source marks.
- Next by Date:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_new_line, _process_remaining_on_line), tp/Texinfo/XS/parsetexi/input.c (new_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): pass current in new_line to get end of macro/value source marks in line commands where there is no macro/value expansion. Explain in a comment that the location of the source mark cannot be accurate, as the text is not parsed as usual in the tree.
- Previous by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_next_text), tp/Texinfo/XS/parsetexi/input.c (next_text): reuse input source mark for delcomment. Do not pass line from input source mark to the other source marks.
- Next by thread:
branch master updated: * tp/Texinfo/ParserNonXS.pm (_new_line, _process_remaining_on_line), tp/Texinfo/XS/parsetexi/input.c (new_line), tp/Texinfo/XS/parsetexi/handle_commands.c (handle_line_command): pass current in new_line to get end of macro/value source marks in line commands where there is no macro/value expansion. Explain in a comment that the location of the source mark cannot be accurate, as the text is not parsed as usual in the tree.
- Index(es):