[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/convert/hashmap.c (clear_register
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/convert/hashmap.c (clear_registered_ids_c_hashmap): do not access the hashmap if it had never been initialized. |
Date: |
Tue, 29 Oct 2024 07:10:54 -0400 |
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 71de2e4d96 * tp/Texinfo/XS/convert/hashmap.c
(clear_registered_ids_c_hashmap): do not access the hashmap if it had never
been initialized.
71de2e4d96 is described below
commit 71de2e4d967cad321ab24708d8335a4908c95883
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Oct 29 12:10:44 2024 +0100
* tp/Texinfo/XS/convert/hashmap.c (clear_registered_ids_c_hashmap):
do not access the hashmap if it had never been initialized.
---
ChangeLog | 5 +++++
tp/TODO | 1 +
tp/Texinfo/Convert/HTML.pm | 4 +++-
tp/Texinfo/XS/convert/hashmap.c | 3 +++
4 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e04833df73..c614fc275a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-29 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/convert/hashmap.c (clear_registered_ids_c_hashmap):
+ do not access the hashmap if it had never been initialized.
+
2024-10-29 Patrice Dumas <pertusus@free.fr>
* tp/t/test_utils.pl: do not set TEST for converter tests if already
diff --git a/tp/TODO b/tp/TODO
index f6f04c3810..eca29871ef 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -10,6 +10,7 @@ This is the todo list for texi2any
Before next release
===================
+Tests of run_stage_handlers handler returning undef, a float, a string, an hash
Bugs
====
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 303c71e1b9..f2a6b43f9d 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -12464,6 +12464,8 @@ sub run_stage_handlers($$$$)
print STDERR "RUN handler $handler_idx: stage $stage, priority
$priority\n";
}
my $status = &{$handler}($converter, $document, $stage);
+ $status = -$converter->get_conf('HANDLER_FATAL_ERROR_LEVEL') -1
+ if (!defined($status));
if ($status != 0) {
if ($status < 0) {
$converter->converter_document_error(
@@ -12474,7 +12476,7 @@ sub run_stage_handlers($$$$)
# already if $status > 0
if ($converter->get_conf('VERBOSE') or $converter->get_conf('DEBUG')) {
print STDERR "FAIL handler $handler_idx: stage $stage, "
- ."priority $priority\n";
+ ."priority $priority, status $status\n";
}
}
return $status;
diff --git a/tp/Texinfo/XS/convert/hashmap.c b/tp/Texinfo/XS/convert/hashmap.c
index 7003e666d1..ec6698b9f1 100644
--- a/tp/Texinfo/XS/convert/hashmap.c
+++ b/tp/Texinfo/XS/convert/hashmap.c
@@ -141,6 +141,9 @@ clear_registered_ids_c_hashmap (CONVERTER *self)
C_HASHMAP *H = (C_HASHMAP *)self->registered_ids_c_hashmap;
int i;
+ if (!H)
+ return;
+
BUCKET_ARENA *arena, *next;
/* Free chain. */
next = H->arena;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/convert/hashmap.c (clear_registered_ids_c_hashmap): do not access the hashmap if it had never been initialized.,
Patrice Dumas <=