texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources), tp/Texinfo/XS/main/create_buttons.c: move create_buttons.c from convert to main, and from C_libtexinfo_convert_sources to C_libtexinfo_sources.
Date: Sun, 08 Dec 2024 12:33:35 -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 98580aed4a * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources), 
tp/Texinfo/XS/main/create_buttons.c: move create_buttons.c from convert to 
main, and from C_libtexinfo_convert_sources to C_libtexinfo_sources.
98580aed4a is described below

commit 98580aed4ab8ef0ef55b1d687d631237914740af
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Dec 8 18:33:25 2024 +0100

    * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources),
    tp/Texinfo/XS/main/create_buttons.c: move create_buttons.c from
    convert to main, and from C_libtexinfo_convert_sources to
    C_libtexinfo_sources.
    
    * tp/Texinfo/XS/main/create_buttons.c (new_button_specification_info):
    add.
    
    * tp/Texinfo/XS/main/get_perl_info.c: remove
    get_sv_index_entries_sorted_by_letter, it is not used and uses Perl
    malloc.
    
    * tp/Texinfo/XS/main/get_perl_info.c
    (html_get_button_specification_list): call
    new_button_specification_list and new_button_specification_info.
    
    * tp/Texinfo/XS/convert/get_converter_perl_info.c,
    tp/Texinfo/XS/convert/get_html_perl_info.c,
    tp/Texinfo/XS/main/get_perl_info.c (get_source_info): use
    non_perl_malloc instead of malloc when allocating data kept in the
    converter and unallocated outside of code including Perl headers.
---
 ChangeLog                                        |  24 +++
 tp/Texinfo/XS/Makefile.am                        |   4 +-
 tp/Texinfo/XS/convert/get_converter_perl_info.c  |   2 +-
 tp/Texinfo/XS/convert/get_html_perl_info.c       |  25 ++-
 tp/Texinfo/XS/{convert => main}/create_buttons.c |  17 +-
 tp/Texinfo/XS/{convert => main}/create_buttons.h |   1 +
 tp/Texinfo/XS/main/get_perl_info.c               | 234 +----------------------
 tp/Texinfo/XS/main/get_perl_info.h               |   3 -
 8 files changed, 59 insertions(+), 251 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3781f8f50a..d8de3a4fa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2024-12-08  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/Makefile.am (C_libtexinfo_sources),
+       tp/Texinfo/XS/main/create_buttons.c: move create_buttons.c from
+       convert to main, and from C_libtexinfo_convert_sources to
+       C_libtexinfo_sources.
+
+       * tp/Texinfo/XS/main/create_buttons.c (new_button_specification_info):
+       add.
+
+       * tp/Texinfo/XS/main/get_perl_info.c: remove
+       get_sv_index_entries_sorted_by_letter, it is not used and uses Perl
+       malloc.
+
+       * tp/Texinfo/XS/main/get_perl_info.c
+       (html_get_button_specification_list): call
+       new_button_specification_list and new_button_specification_info.
+
+       * tp/Texinfo/XS/convert/get_converter_perl_info.c,
+       tp/Texinfo/XS/convert/get_html_perl_info.c,
+       tp/Texinfo/XS/main/get_perl_info.c (get_source_info): use
+       non_perl_malloc instead of malloc when allocating data kept in the
+       converter and unallocated outside of code including Perl headers.
+
 2024-12-08  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/convert/converter.c (create_destination_directory),
diff --git a/tp/Texinfo/XS/Makefile.am b/tp/Texinfo/XS/Makefile.am
index b3cc94c54e..48b075c8eb 100644
--- a/tp/Texinfo/XS/Makefile.am
+++ b/tp/Texinfo/XS/Makefile.am
@@ -166,6 +166,8 @@ C_libtexinfo_sources = \
                      main/convert_to_text.h \
                      main/convert_utils.c \
                      main/convert_utils.h \
+                     main/create_buttons.c \
+                     main/create_buttons.h \
                      main/customization_options.c \
                      main/customization_options.h \
                      main/html_conversion_data.c \
@@ -485,8 +487,6 @@ C_libtexinfo_convert_sources = \
                        convert/cmd_converter.c \
                        convert/converters_options.c \
                        convert/converters_options.h \
-                       convert/create_buttons.c \
-                       convert/create_buttons.h \
                        convert/convert_html.h \
                        convert/convert_html.c \
                        convert/format_html.h \
diff --git a/tp/Texinfo/XS/convert/get_converter_perl_info.c 
b/tp/Texinfo/XS/convert/get_converter_perl_info.c
index 3fc60cc641..868ef7a13f 100644
--- a/tp/Texinfo/XS/convert/get_converter_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_converter_perl_info.c
@@ -179,7 +179,7 @@ set_translated_commands (SV *translated_commands_sv)
         }
 
       translated_commands = (TRANSLATED_COMMAND *)
-        malloc ((hv_number +1) * sizeof (TRANSLATED_COMMAND));
+        non_perl_malloc ((hv_number +1) * sizeof (TRANSLATED_COMMAND));
       memset (translated_commands, 0,
               (hv_number +1) * sizeof (TRANSLATED_COMMAND));
 
diff --git a/tp/Texinfo/XS/convert/get_html_perl_info.c 
b/tp/Texinfo/XS/convert/get_html_perl_info.c
index 4d4a598f09..45f0917277 100644
--- a/tp/Texinfo/XS/convert/get_html_perl_info.c
+++ b/tp/Texinfo/XS/convert/get_html_perl_info.c
@@ -340,7 +340,7 @@ html_converter_get_customization_sv (SV *converter_sv,
       hv_number = hv_iterinit (upper_case_commands_hv);
 
       converter->html_customized_upper_case_commands
-        = (COMMAND_INTEGER_INFORMATION *) malloc ((hv_number + 1)
+        = (COMMAND_INTEGER_INFORMATION *) non_perl_malloc ((hv_number + 1)
                                   * sizeof (COMMAND_INTEGER_INFORMATION));
       memset (converter->html_customized_upper_case_commands, 0,
               (hv_number + 1) * sizeof (COMMAND_INTEGER_INFORMATION));
@@ -381,13 +381,13 @@ html_converter_get_customization_sv (SV *converter_sv,
       hv_number = hv_iterinit (customized_type_formatting_hv);
 
       converter->html_customized_code_types
-        = (TYPE_INTEGER_INFORMATION *) malloc ((hv_number + 1)
+        = (TYPE_INTEGER_INFORMATION *) non_perl_malloc ((hv_number + 1)
                                   * sizeof (TYPE_INTEGER_INFORMATION));
       memset (converter->html_customized_code_types, 0,
               (hv_number + 1) * sizeof (TYPE_INTEGER_INFORMATION));
 
       converter->html_customized_pre_class_types
-        = (PRE_CLASS_TYPE_INFO *) malloc ((hv_number + 1)
+        = (PRE_CLASS_TYPE_INFO *) non_perl_malloc ((hv_number + 1)
                                   * sizeof (PRE_CLASS_TYPE_INFO));
       memset (converter->html_customized_pre_class_types, 0,
               (hv_number + 1) * sizeof (PRE_CLASS_TYPE_INFO));
@@ -463,7 +463,7 @@ html_converter_get_customization_sv (SV *converter_sv,
       hv_number = hv_iterinit (accent_entities_hv);
 
       converter->html_customized_accent_entity_info
-        = (COMMAND_ACCENT_ENTITY_INFO *) malloc ((hv_number + 1)
+        = (COMMAND_ACCENT_ENTITY_INFO *) non_perl_malloc ((hv_number + 1)
                                   * sizeof (COMMAND_ACCENT_ENTITY_INFO));
       memset (converter->html_customized_accent_entity_info, 0,
               (hv_number + 1) * sizeof (COMMAND_ACCENT_ENTITY_INFO));
@@ -523,7 +523,8 @@ html_converter_get_customization_sv (SV *converter_sv,
       hv_number = hv_iterinit (style_commands_formatting_hv);
 
       converter->html_customized_style_commands
-        = (COMMAND_HTML_STYLE_COMMAND_CONVERSION *) malloc ((hv_number + 1)
+        = (COMMAND_HTML_STYLE_COMMAND_CONVERSION *)
+              non_perl_malloc ((hv_number + 1)
                         * sizeof (COMMAND_HTML_STYLE_COMMAND_CONVERSION));
       memset (converter->html_customized_style_commands, 0,
          (hv_number + 1) * sizeof (COMMAND_HTML_STYLE_COMMAND_CONVERSION));
@@ -580,7 +581,8 @@ html_converter_get_customization_sv (SV *converter_sv,
                           I32 s;
                           HTML_STYLE_COMMAND_CONVERSION *format_spec
                            = (HTML_STYLE_COMMAND_CONVERSION *)
-                            malloc (sizeof (HTML_STYLE_COMMAND_CONVERSION));
+                             non_perl_malloc (
+                                   sizeof (HTML_STYLE_COMMAND_CONVERSION));
 
                           HV *format_spec_hv = (HV *)SvRV (format_spec_sv);
 
@@ -681,7 +683,8 @@ html_converter_get_customization_sv (SV *converter_sv,
                           HV *format_spec_hv = (HV *)SvRV (format_spec_sv);
 
                           format_spec = (HTML_NO_ARG_COMMAND_CONVERSION *)
-                            malloc (sizeof (HTML_NO_ARG_COMMAND_CONVERSION));
+                            non_perl_malloc (
+                              sizeof (HTML_NO_ARG_COMMAND_CONVERSION));
                           memset (format_spec, 0,
                                   sizeof (HTML_NO_ARG_COMMAND_CONVERSION));
                           converter->customized_no_arg_commands_formatting
@@ -777,7 +780,8 @@ html_converter_get_customization_sv (SV *converter_sv,
           /* do not use new_directions_strings_type as a 0 for a direction 
array
              is allowed here, it means that there is a customized value undef 
*/
               converter->customized_directions_strings[customized_type]
-                = (char ***) malloc (nr_string_directions * sizeof (char **));
+                = (char ***) non_perl_malloc (nr_string_directions
+                                                * sizeof (char **));
               memset 
(converter->customized_directions_strings[customized_type],
                       0, nr_string_directions * sizeof (char **));
             }
@@ -832,7 +836,8 @@ html_converter_get_customization_sv (SV *converter_sv,
                           converter->
                            customized_directions_strings[customized_type][i]
                             = (char **)
-                           malloc (nr_dir_str_contexts * sizeof (char *));
+                           non_perl_malloc (nr_dir_str_contexts
+                                                          * sizeof (char *));
                           memset (converter->
                              customized_directions_strings[customized_type][i],
                              0, nr_dir_str_contexts * sizeof (char *));
@@ -1221,7 +1226,7 @@ html_converter_get_customization_sv (SV *converter_sv,
 
               stage_handler_list->number = stage_handlers_info_nr;
               stage_handler_list->list = (HTML_STAGE_HANDLER_INFO *)
-                 malloc (sizeof (HTML_STAGE_HANDLER_INFO)
+                 non_perl_malloc (sizeof (HTML_STAGE_HANDLER_INFO)
                                                   * stage_handlers_info_nr);
 
               for (k = 0; k < stage_handlers_info_nr; k++)
diff --git a/tp/Texinfo/XS/convert/create_buttons.c 
b/tp/Texinfo/XS/main/create_buttons.c
similarity index 95%
rename from tp/Texinfo/XS/convert/create_buttons.c
rename to tp/Texinfo/XS/main/create_buttons.c
index 5d854a110e..c2c6e3031f 100644
--- a/tp/Texinfo/XS/convert/create_buttons.c
+++ b/tp/Texinfo/XS/main/create_buttons.c
@@ -25,9 +25,6 @@
 #include "converter_types.h"
 /* html_get_direction_index */
 #include "utils.h"
-/*
-#include "converter.h"
- */
 #include "create_buttons.h"
 
 /* should be consistent with enum BUTTON_special_unit_directions.  See
@@ -37,6 +34,16 @@ static const char *buttons_special_units_names[] = {
     "About",
 };
 
+BUTTON_SPECIFICATION_INFO *
+new_button_specification_info (void)
+{
+  BUTTON_SPECIFICATION_INFO *button_spec
+    = (BUTTON_SPECIFICATION_INFO *)
+        malloc (sizeof (BUTTON_SPECIFICATION_INFO));
+  memset (button_spec, 0, sizeof (BUTTON_SPECIFICATION_INFO));
+  return button_spec;
+}
+
 /* create button specification */
 void
 new_button_specification (BUTTON_SPECIFICATION *button,
@@ -60,9 +67,7 @@ new_button_specification (BUTTON_SPECIFICATION *button,
   else if (type == BST_direction_info)
     {
       BUTTON_SPECIFICATION_INFO *button_spec
-       = (BUTTON_SPECIFICATION_INFO *)
-           malloc (sizeof (BUTTON_SPECIFICATION_INFO));
-      memset (button_spec, 0, sizeof (BUTTON_SPECIFICATION_INFO));
+                    = new_button_specification_info ();
 
       button->b.button_info = button_spec;
 
diff --git a/tp/Texinfo/XS/convert/create_buttons.h 
b/tp/Texinfo/XS/main/create_buttons.h
similarity index 96%
rename from tp/Texinfo/XS/convert/create_buttons.h
rename to tp/Texinfo/XS/main/create_buttons.h
index 81f488d641..dc2f6a590f 100644
--- a/tp/Texinfo/XS/convert/create_buttons.h
+++ b/tp/Texinfo/XS/main/create_buttons.h
@@ -16,6 +16,7 @@ enum BUTTON_special_unit_directions {
     BSUD_D_Contents,
 };
 
+BUTTON_SPECIFICATION_INFO *new_button_specification_info (void);
 void new_button_specification (BUTTON_SPECIFICATION *button,
                           enum button_specification_type type,
                           enum button_information_type info_type,
diff --git a/tp/Texinfo/XS/main/get_perl_info.c 
b/tp/Texinfo/XS/main/get_perl_info.c
index 457f1b7f1e..f71a69fede 100644
--- a/tp/Texinfo/XS/main/get_perl_info.c
+++ b/tp/Texinfo/XS/main/get_perl_info.c
@@ -45,6 +45,7 @@
 #include "targets.h"
 #include "parser_conf.h"
 #include "document.h"
+#include "create_buttons.h"
 #include "output_unit.h"
 #include "get_perl_info.h"
 
@@ -360,7 +361,8 @@ get_source_info (SV *source_info_sv)
 
   hv_in = (HV *)SvRV (source_info_sv);
 
-  SOURCE_INFO *source_info = (SOURCE_INFO *) malloc (sizeof (SOURCE_INFO));
+  SOURCE_INFO *source_info
+    = (SOURCE_INFO *) non_perl_malloc (sizeof (SOURCE_INFO));
   memset (source_info, 0, sizeof (SOURCE_INFO));
 
   FETCH(macro)
@@ -598,221 +600,6 @@ find_index_entry_sv (const SV *index_entry_sv, INDEX_LIST 
*indices_info,
   return 0;
 }
 
-
-/* code in comments allow to sort the index names to have a fixed order
-   in the data structure.  Not clear that it is useful or not, not enabled
-   for now */
-/* return value to be freed by caller */
-/* Currently not used */
-INDEX_SORTED_BY_LETTER *
-get_sv_index_entries_sorted_by_letter (INDEX_LIST *indices_info,
-                                       SV *index_entries_sorted_by_letter)
-{
-  INDEX_SORTED_BY_LETTER *indices_entries_by_letter;
-
-  HV *hv_in;
-  /* for sorted index names
-  AV *index_names_av;
-  SV **index_names_av_array;
-  SV **sorted_index_names_av_array;
-  I32 i;
-   */
-  I32 index_names_nr;
-
-  SSize_t j;
-
-  dTHX;
-
-  if (!SvOK (index_entries_sorted_by_letter))
-    return 0;
-
-  hv_in = (HV *)SvRV (index_entries_sorted_by_letter);
-
-  index_names_nr = hv_iterinit (hv_in);
-
-  /* when there is a memcpy just below, a condition that avoids negative
-     index_names_nr is important to avoid a gcc warning */
-  if (index_names_nr <= 0)
-    return 0;
-
-  /* doing an AV with the keys (first step of sorting)
-  index_names_av = newAV ();
-
-  for (i = 0; i < index_names_nr; i++)
-    {
-      HE *next = hv_iternext (hv_in);
-      SV *index_name_sv = hv_iterkeysv (next);
-      av_push (index_names_av, index_name_sv);
-    }
-   */
-  /* copy and sort
-  index_names_av_array = AvARRAY(index_names_av);
-  sorted_index_names_av_array
-       = (SV **) malloc (sizeof (SV *) * index_names_nr);
-  memcpy (sorted_index_names_av_array, index_names_av_array,
-          sizeof (SV *) * index_names_nr);
-  sortsv (sorted_index_names_av_array, index_names_nr, Perl_sv_cmp);
-   */
-
-  indices_entries_by_letter = (INDEX_SORTED_BY_LETTER *)
-    malloc ((index_names_nr +1) * sizeof (INDEX_SORTED_BY_LETTER));
-  /* zeroed entry to mark the end of the array */
-  memset (&indices_entries_by_letter[index_names_nr], 0,
-          sizeof (INDEX_SORTED_BY_LETTER));
-
-  for (j = 0; j < index_names_nr; j++)
-    {
-      int i;
-      INDEX_SORTED_BY_LETTER *index_index_letters;
-      char *idx_name = 0;
-      SSize_t letter_entries_nr;
-      HE *sorted_by_letter_he;
-      SV *idx_name_sv;
-      SV *sorted_by_letter_sv;
-      AV *av;
-
-      /* unsorted AV (to compare unsorted/sorted for debug)
-      SV **idx_name_sv_ref = av_fetch (index_names_av, j, 0);
-      if (!idx_name_sv_ref)
-        {
-          char *msg;
-          xasprintf (&msg,
-            "get_sv_index_entries_sorted_by_letter: %d: no index name\n", j);
-          fatal (msg);
-        }
-      idx_name_sv = *idx_name_sv_ref;
-       */
-       /* sorted SV**
-      idx_name_sv = sorted_index_names_av_array[j];
-       */
-      /* unsorted HV
-       */
-      HE *next = hv_iternext (hv_in);
-      idx_name_sv = hv_iterkeysv (next);
-      /* code common to all the cases above */
-      if (!idx_name_sv)
-        {
-          char *msg;
-          xasprintf (&msg,
-            "get_sv_index_entries_sorted_by_letter: %d: no index name\n", j);
-          fatal (msg);
-        }
-      idx_name = (char *) SvPVutf8_nolen (idx_name_sv);
-
-      sorted_by_letter_he = hv_fetch_ent (hv_in, idx_name_sv, 0, 0);
-      if (!sorted_by_letter_he)
-        {
-          char *msg;
-          xasprintf (&msg,
-           "get_sv_index_entries_sorted_by_letter: %d: %s: cannot find 
index\n",
-                     j, idx_name);
-          fatal (msg);
-        }
-
-      sorted_by_letter_sv = HeVAL(sorted_by_letter_he);
-      if (!sorted_by_letter_sv)
-        {
-          char *msg;
-          xasprintf (&msg,
-            "get_sv_index_entries_sorted_by_letter: %d: %s: no letter 
entries\n",
-                     j, idx_name);
-          fatal (msg);
-        }
-      av = (AV *)SvRV (sorted_by_letter_sv);
-      letter_entries_nr = AvFILL (av) +1;
-
-      index_index_letters = &indices_entries_by_letter[j];
-      index_index_letters->name = non_perl_strdup (idx_name);
-      index_index_letters->letter_number = letter_entries_nr;
-      index_index_letters->letter_entries
-        = (LETTER_INDEX_ENTRIES *)
-         malloc (letter_entries_nr * sizeof (LETTER_INDEX_ENTRIES));
-      for (i = 0; i < letter_entries_nr; i++)
-        {
-          SV** letter_entries_sv = av_fetch (av, i, 0);
-          LETTER_INDEX_ENTRIES *letter_entries
-            = &index_index_letters->letter_entries[i];
-          if (letter_entries_sv)
-            {
-              SSize_t k;
-              char *letter_string;
-              SSize_t entries_nr;
-              AV *entries_av;
-
-              HV *letter_entries_hv = (HV *) SvRV (*letter_entries_sv);
-              SV **letter_sv = hv_fetch (letter_entries_hv, "letter",
-                                         strlen ("letter"), 0);
-              SV **entries_sv = hv_fetch (letter_entries_hv, "entries",
-                                         strlen ("entries"), 0);
-              if (!letter_sv || !entries_sv)
-                {
-                  char *msg;
-                  xasprintf (&msg,
-  "get_sv_index_entries_sorted_by_letter: %s: %d: no letter and entries\n",
-                             idx_name, i);
-                  fatal (msg);
-                }
-              letter_string = (char *) SvPVutf8_nolen (*letter_sv);
-              letter_entries->letter = non_perl_strdup (letter_string);
-
-              entries_av = (AV *) SvRV (*entries_sv);
-              entries_nr = AvFILL (entries_av) +1;
-              letter_entries->entries_number = entries_nr;
-              letter_entries->entries =
-                (INDEX_ENTRY **) malloc (entries_nr * sizeof (INDEX_ENTRY *));
-              for (k = 0; k < entries_nr; k++)
-                {
-                  SV** index_entry_sv = av_fetch (entries_av, k, 0);
-                  const INDEX *entry_idx = 0;
-                  int entry_number;
-                  char *warn_string;
-                  INDEX_ENTRY *index_entry = 0;
-
-                  if (!index_entry_sv)
-                    {
-                      char *msg;
-                      xasprintf (&msg,
-        "get_sv_index_entries_sorted_by_letter: %s: %d: %s: %d: no entry\n",
-                             idx_name, i, letter_entries->letter, k);
-                      fatal (msg);
-                    }
-                  non_perl_xasprintf (&warn_string,
-                     "get_sv_index_entries_sorted_by_letter: %s: %d: %s: %d",
-                         idx_name, i, letter_entries->letter, k);
-                  index_entry
-                    = find_index_entry_sv (*index_entry_sv, indices_info,
-                                           warn_string, &entry_idx,
-                                           &entry_number);
-                  non_perl_free (warn_string);
-
-                  letter_entries->entries[k] = index_entry;
-
-                  if (!letter_entries->entries[k])
-                    {
-                      char *msg;
-                      char *entry_index_name = 0;
-                      if (entry_idx)
-                        entry_index_name = entry_idx->name;
-                      xasprintf (&msg,
-          "BUG: index %s letter %s position %d: %s entry %d not found\n",
-                                 idx_name, letter_string, k,
-                                 entry_index_name, entry_number);
-                    }
-                }
-            }
-          else
-            {
-              char *msg;
-              xasprintf (&msg,
-    "get_sv_index_entries_sorted_by_letter: %s: %d: no letter entries\n",
-                         idx_name, i);
-              fatal (msg);
-            }
-        }
-    }
-  return indices_entries_by_letter;
-}
-
 /* output format specific */
 
 /* should be consistent with enum button_function_type */
@@ -900,20 +687,11 @@ html_get_button_specification_list (const CONVERTER 
*converter,
   if (buttons_nr == 0)
     return 0;
 
-  result = (BUTTON_SPECIFICATION_LIST *)
-            malloc (sizeof (BUTTON_SPECIFICATION_LIST));
+  result = new_button_specification_list ((size_t) buttons_nr);
 
   result->av = buttons_av;
   SvREFCNT_inc ((SV *)result->av);
 
-  result->number = (size_t) buttons_nr;
-
-  result->BIT_user_function_number = 0;
-
-  result->list = (BUTTON_SPECIFICATION *)
-    malloc (result->number * sizeof (BUTTON_SPECIFICATION));
-  memset (result->list, 0, result->number * sizeof (BUTTON_SPECIFICATION));
-
   for (i = 0; i < result->number; i++)
     {
       SV **button_sv = av_fetch (result->av, (SSize_t) i, 0);
@@ -943,9 +721,7 @@ html_get_button_specification_list (const CONVERTER 
*converter,
               const char *direction_name;
 
               BUTTON_SPECIFICATION_INFO *button_spec
-                = (BUTTON_SPECIFICATION_INFO *)
-                   malloc (sizeof (BUTTON_SPECIFICATION_INFO));
-              memset (button_spec, 0, sizeof (BUTTON_SPECIFICATION_INFO));
+                = new_button_specification_info ();
 
               button->type = BST_direction_info;
               button->b.button_info = button_spec;
diff --git a/tp/Texinfo/XS/main/get_perl_info.h 
b/tp/Texinfo/XS/main/get_perl_info.h
index 43c181cdbc..b75fed0a2a 100644
--- a/tp/Texinfo/XS/main/get_perl_info.h
+++ b/tp/Texinfo/XS/main/get_perl_info.h
@@ -47,9 +47,6 @@ INDEX_ENTRY *find_index_entry_sv (const SV *index_entry_sv,
                      const char *warn_string, const INDEX **entry_idx,
                      int *entry_number);
 
-INDEX_SORTED_BY_LETTER *get_sv_index_entries_sorted_by_letter
-                 (INDEX_LIST *indices_info, SV 
*index_entries_sorted_by_letter);
-
 BUTTON_SPECIFICATION_LIST *html_get_button_specification_list
                                 (const CONVERTER *converter, const SV 
*buttons_sv);
 void html_fill_button_sv_specification_list (const CONVERTER *converter,



reply via email to

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