texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/convert/texinfo.c (txi_reset_conv


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/convert/texinfo.c (txi_reset_converter) (txi_destroy_converter), tp/Texinfo/XS/teximakehtml.c: add wrappers for reset_converter and destroy_converter in texinfo.c and call them in teximakehtml.c.
Date: Fri, 04 Oct 2024 06:50:03 -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 b52e58d087 * tp/Texinfo/XS/convert/texinfo.c (txi_reset_converter) 
(txi_destroy_converter), tp/Texinfo/XS/teximakehtml.c: add wrappers for 
reset_converter and destroy_converter in texinfo.c and call them in 
teximakehtml.c.
b52e58d087 is described below

commit b52e58d087d788508e5244fc7a4cf780b0794738
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Aug 13 21:13:59 2024 +0200

    * tp/Texinfo/XS/convert/texinfo.c (txi_reset_converter)
    (txi_destroy_converter), tp/Texinfo/XS/teximakehtml.c: add wrappers
    for reset_converter and destroy_converter in texinfo.c and call them
    in teximakehtml.c.
---
 ChangeLog                       |  7 +++++++
 tp/TODO                         |  7 +++----
 tp/Texinfo/XS/convert/texinfo.c | 14 +++++++++++++-
 tp/Texinfo/XS/convert/texinfo.h |  3 +++
 tp/Texinfo/XS/teximakehtml.c    |  9 +++++----
 5 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d3899d15f7..dd8e4d5074 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,13 @@
 
        * tp/Texinfo/XS/teximakehtml.c: add missing include.
 
+2024-08-13  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/convert/texinfo.c (txi_reset_converter)
+       (txi_destroy_converter), tp/Texinfo/XS/teximakehtml.c: add wrappers
+       for reset_converter and destroy_converter in texinfo.c and call them
+       in teximakehtml.c.
+
 2024-08-13  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/converter.c (new_converter): rename
diff --git a/tp/TODO b/tp/TODO
index a08eb334c3..ac76883ddd 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -786,7 +786,7 @@ symbols.  The documentation of valgrind
   https://valgrind.org/docs/manual/faq.html#faq.unhelpful
 hints that the memory appearing as leaked probably comes from a dlclosed 
object:
  "if the shared object is unloaded before the program terminates, Valgrind 
will discard the debug information and the error message will be full of ??? 
entries. If you use the option --keep-debuginfo=yes, then Valgrind will keep 
the debug information"
-What probably happens in that case is that a true leak or memory issue
+What could happen in that case is that something
 prevents the memory still accessible from the dlclosed object to be released
 properly, such that all the data that would have been accessible before
 dlcosing becomes inaccessible, while being kept in valgrind output and appear
@@ -888,13 +888,12 @@ SUM: 98
 Setting flags
 # some features are only enabled at -O2, but sometime -O0 is better
 # for debugging with valgrind
-our_CFLAGS='-g -O0 -Wformat-security -Wstrict-prototypes -Wall 
-Wno-parentheses -Wno-missing-braces'
+our_CFLAGS='-g -O0 -Wformat-security -Wstrict-prototypes -Wall 
-Wno-parentheses -Wno-missing-braces -Wno-unused-parameter -Wextra'
 # Without -Wstack-protector there is no message on functions not protected.
 # All these are in gnulib or gettext for now.
 # -fno-omit-frame-pointer is better for debugging with valgrind, but has
 # some speed penalty
-our_CFLAGS='-g -O2 -D_FORTIFY_SOURCE=2 -Wformat-security -Wstrict-prototypes 
-Wall -Wno-parentheses -Wno-missing-braces -Wno-unused-parameter 
-fstack-protector-all -Wextra -Wno-sign-compare -fno-omit-frame-pointer'
-our_CFLAGS='-g -O2 -Wformat-security -Wstrict-prototypes -Wall 
-Wno-parentheses -Wno-missing-braces -Wno-unused-parameter -Wextra 
-Wno-sign-compare'
+our_CFLAGS='-g -O2 -D_FORTIFY_SOURCE=2 -Wformat-security -Wstrict-prototypes 
-Wall -Wno-parentheses -Wno-missing-braces -Wno-unused-parameter 
-fstack-protector-all -Wextra -fno-omit-frame-pointer'
 our_CFLAGS='-g -O2 -Wformat-security -Wstrict-prototypes -Wall 
-Wno-parentheses -Wno-missing-braces -Wno-unused-parameter -Wextra'
 ./configure "CFLAGS=$our_CFLAGS" "PERL_EXT_CFLAGS=$our_CFLAGS"
 unset our_CFLAGS
diff --git a/tp/Texinfo/XS/convert/texinfo.c b/tp/Texinfo/XS/convert/texinfo.c
index 5dfafe8405..a19a8097b6 100644
--- a/tp/Texinfo/XS/convert/texinfo.c
+++ b/tp/Texinfo/XS/convert/texinfo.c
@@ -452,7 +452,7 @@ txi_html_output (CONVERTER *converter, DOCUMENT *document)
 
 
 
-/* high level interface hiding some details of the data */
+/* high level interface, possibly hiding some details of the data */
 
 DOCUMENT *
 txi_parse_texi_file (const char *input_file_path, int *status)
@@ -467,6 +467,18 @@ txi_remove_document (DOCUMENT *document)
   remove_document_descriptor (document->descriptor);
 }
 
+void
+txi_reset_converter (CONVERTER *converter)
+{
+  reset_converter (converter);
+}
+
+void
+txi_destroy_converter (CONVERTER *converter)
+{
+  destroy_converter (converter);
+}
+
 size_t
 txi_handle_parser_error_messages (DOCUMENT *document, int no_warn,
                                   int use_filename,
diff --git a/tp/Texinfo/XS/convert/texinfo.h b/tp/Texinfo/XS/convert/texinfo.h
index 9541be699c..31f21528fd 100644
--- a/tp/Texinfo/XS/convert/texinfo.h
+++ b/tp/Texinfo/XS/convert/texinfo.h
@@ -60,4 +60,7 @@ size_t txi_handle_converter_error_messages (CONVERTER 
*converter, int no_warn,
 
 void txi_remove_document (DOCUMENT *document);
 
+void txi_reset_converter (CONVERTER *converter);
+void txi_destroy_converter (CONVERTER *converter);
+
 #endif
diff --git a/tp/Texinfo/XS/teximakehtml.c b/tp/Texinfo/XS/teximakehtml.c
index e5626bd057..2912d14663 100644
--- a/tp/Texinfo/XS/teximakehtml.c
+++ b/tp/Texinfo/XS/teximakehtml.c
@@ -36,9 +36,6 @@
 #include "convert_to_texinfo.h"
  */
 #include "create_buttons.h"
-/* html_free_converter */
-#include "html_converter_finish.h"
-#include "convert_html.h"
 #include "texinfo.h"
 
 #define LOCALEDIR DATADIR "/locale"
@@ -216,8 +213,12 @@ main (int argc, char *argv[])
     = txi_handle_converter_error_messages (converter, 0, 1, locale_encoding);
   errors_count += errors_nr;
 
+  /* free after output */
+  txi_reset_converter (converter);
+
+
   /* destroy converter */
-  html_free_converter (converter);
+  txi_destroy_converter (converter);
   /* destroy document */
   txi_remove_document (document);
 



reply via email to

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