texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: * tp/Texinfo/XS/main/document.c (destroy_document


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/main/document.c (destroy_document_information_except_tree): free document->parser_error_messages.
Date: Sun, 10 Mar 2024 11:17:48 -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 9dc3012dd3 * tp/Texinfo/XS/main/document.c 
(destroy_document_information_except_tree): free 
document->parser_error_messages.
9dc3012dd3 is described below

commit 9dc3012dd3c339101af26f5ae3bf2d89ae2111e9
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Mar 10 16:17:52 2024 +0100

    * tp/Texinfo/XS/main/document.c
    (destroy_document_information_except_tree): free
    document->parser_error_messages.
    
    * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): show
    and clear parser error messages, not other document errors.
---
 ChangeLog                            | 9 +++++++++
 tp/Texinfo/XS/main/document.c        | 2 ++
 tp/Texinfo/XS/main/translations.c    | 6 +++---
 tp/Texinfo/XS/parsetexi/Parsetexi.xs | 2 --
 4 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ab0791abad..0ff56f9367 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-03-10  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/document.c
+       (destroy_document_information_except_tree): free
+       document->parser_error_messages.
+
+       * tp/Texinfo/XS/main/translations.c (replace_convert_substrings): show
+       and clear parser error messages, not other document errors.
+
 2024-03-10  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/HTML.pm (_node_redirections): use labels_list
diff --git a/tp/Texinfo/XS/main/document.c b/tp/Texinfo/XS/main/document.c
index ad3a6add95..0521023839 100644
--- a/tp/Texinfo/XS/main/document.c
+++ b/tp/Texinfo/XS/main/document.c
@@ -433,6 +433,8 @@ destroy_document_information_except_tree (DOCUMENT 
*document)
       wipe_index_names (document->index_names);
       wipe_error_message_list (document->error_messages);
       free (document->error_messages);
+      wipe_error_message_list (document->parser_error_messages);
+      free (document->parser_error_messages);
       if (document->nodes_list)
         destroy_list (document->nodes_list);
       if (document->sections_list)
diff --git a/tp/Texinfo/XS/main/translations.c 
b/tp/Texinfo/XS/main/translations.c
index ecaf50900c..21179c9994 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -481,9 +481,9 @@ replace_convert_substrings (char *translated_string,
     fprintf (stderr, "XS|IN TR PARSER '%s'\n", texinfo_line);
 
   document = retrieve_document (document_descriptor);
-  if (document->error_messages->number > 0)
+  if (document->parser_error_messages->number > 0)
     {
-      ERROR_MESSAGE_LIST *error_messages = document->error_messages;
+      ERROR_MESSAGE_LIST *error_messages = document->parser_error_messages;
       fprintf (stderr, "translation %zu error(s)\n",
                error_messages->number);
       fprintf (stderr, "translated string: %s\n", translated_string);
@@ -491,7 +491,7 @@ replace_convert_substrings (char *translated_string,
       for (i = 0; i < error_messages->number; i++)
         fprintf (stderr, "%s", error_messages->list[i].error_line);
     }
-  clear_document_errors (document_descriptor);
+  clear_document_parser_errors (document_descriptor);
 
   parser_set_accept_internalvalue (0);
 
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs 
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index a2162bf412..dc5690d66a 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -33,8 +33,6 @@
 #include "conf.h"
 #include "build_perl_info.h"
 #include "input.h"
-/* for clear_document_errors */
-#include "document.h"
 
  /* See the NOTE in build_perl_info.c on use of functions related to
     memory allocation */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]