[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
From: |
Patrice Dumas |
Date: |
Sun, 20 Oct 2024 18:18:09 -0400 (EDT) |
branch: master
commit 0e4799d6e35370867cd8f12d9f42446fcc818ca7
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Oct 21 00:18:02 2024 +0200
* tp/Texinfo/XS/parsetexi/Parsetexi.xs (errors): abort if there is no
registrar but errors was called on a Parser.
---
ChangeLog | 5 +++++
tp/Texinfo/XS/parsetexi/Parsetexi.xs | 7 +++++++
2 files changed, 12 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b3baa9eeb1..04b576e34a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-20 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/parsetexi/Parsetexi.xs (errors): abort if there is no
+ registrar but errors was called on a Parser.
+
2024-10-20 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/build_perl_info.c
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index 52ca7761aa..af508209a0 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -15,6 +15,7 @@
#include <config.h>
+#include <stdlib.h>
#include <stddef.h>
/* Avoid namespace conflicts. */
@@ -328,6 +329,12 @@ errors (SV *parser_sv)
hv_store (registrar_hv, "error_nrs",
strlen ("error_nrs"), newSViv (0), 0);
}
+ else
+ {
+ fprintf (stderr,
+ "BUG: no registrar but Parser::errors is called\n");
+ abort ();
+ }
EXTEND(SP, 2);
PUSHs(sv_2mortal(errors_warnings_sv));