texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/parsetexi/api.c (store_additional


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/parsetexi/api.c (store_additional_info), tp/Texinfo/XS/parsetexi/extra.c (add_extra_contents_array) (add_extra_index_entry), tp/Texinfo/XS/parsetexi/tree.c (destroy_associated_info), tp/Texinfo/XS/parsetexi/tree_types.h: remove extra_contents_array and extra_index_entry extra types and associated functions, add_extra_contents_array and add_extra_index_entry.
Date: Mon, 06 Mar 2023 13:17:32 -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 658f56224e * tp/Texinfo/XS/parsetexi/api.c (store_additional_info), 
tp/Texinfo/XS/parsetexi/extra.c (add_extra_contents_array) 
(add_extra_index_entry), tp/Texinfo/XS/parsetexi/tree.c 
(destroy_associated_info), tp/Texinfo/XS/parsetexi/tree_types.h: remove 
extra_contents_array and extra_index_entry extra types and associated 
functions, add_extra_contents_array and add_extra_index_entry.
658f56224e is described below

commit 658f56224ea0570fd64990e690728911b8f3cf20
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Mar 6 19:17:21 2023 +0100

    * tp/Texinfo/XS/parsetexi/api.c (store_additional_info),
    tp/Texinfo/XS/parsetexi/extra.c (add_extra_contents_array)
    (add_extra_index_entry), tp/Texinfo/XS/parsetexi/tree.c
    (destroy_associated_info), tp/Texinfo/XS/parsetexi/tree_types.h:
    remove extra_contents_array and extra_index_entry extra types and
    associated functions, add_extra_contents_array and
    add_extra_index_entry.
---
 ChangeLog                            | 10 ++++++++++
 tp/Texinfo/XS/parsetexi/api.c        | 29 -----------------------------
 tp/Texinfo/XS/parsetexi/extra.c      | 21 +++------------------
 tp/Texinfo/XS/parsetexi/parser.h     |  1 -
 tp/Texinfo/XS/parsetexi/tree.c       | 13 -------------
 tp/Texinfo/XS/parsetexi/tree_types.h |  2 --
 6 files changed, 13 insertions(+), 63 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 672f801417..52281ba7aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-03-06  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/parsetexi/api.c (store_additional_info),
+       tp/Texinfo/XS/parsetexi/extra.c (add_extra_contents_array)
+       (add_extra_index_entry), tp/Texinfo/XS/parsetexi/tree.c
+       (destroy_associated_info), tp/Texinfo/XS/parsetexi/tree_types.h:
+       remove extra_contents_array and extra_index_entry extra types and
+       associated functions, add_extra_contents_array and
+       add_extra_index_entry.
+
 2023-03-06  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (_process_remaining_on_line)
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index e1929d4736..b817bad908 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -343,28 +343,6 @@ store_additional_info (ELEMENT *e, ASSOCIATED_INFO* a, 
char *key)
                 STORE(build_perl_array (&f->contents));
               break;
               }
-            case extra_contents_array:
-              {
-              /* Like extra_contents, but this time output an array
-                 of arrays (instead of an array). */
-              int j;
-              AV *av;
-              av = newAV ();
-              STORE(newRV_inc ((SV *)av));
-              for (j = 0; j < f->contents.number; j++)
-                {
-                  SV *array;
-                  ELEMENT *g;
-
-                  g = f->contents.list[j];
-                  if (g)
-                    array = build_perl_array (&g->contents);
-                  else
-                    array = newSV (0); /* undef */
-                  av_push (av, array);
-                }
-              break;
-              }
             case extra_string:
               { /* A simple string. */
               char *value = (char *) f;
@@ -402,13 +380,6 @@ store_additional_info (ELEMENT *e, ASSOCIATED_INFO* a, 
char *key)
                 }
               break;
               }
-            case extra_index_entry:
-            /* A "index_entry" extra key on a command defining an index
-               entry.  Unlike the other keys, the value is not in the
-               main parse tree, but in the indices_information.  It would
-               be much nicer if we could get rid of the need for this key.
-               We set this afterwards in build_index_data. */
-              break;
             case extra_def_info:
               {
               DEF_INFO *d = (DEF_INFO *) f;
diff --git a/tp/Texinfo/XS/parsetexi/extra.c b/tp/Texinfo/XS/parsetexi/extra.c
index 76312d6e2e..6d79242c88 100644
--- a/tp/Texinfo/XS/parsetexi/extra.c
+++ b/tp/Texinfo/XS/parsetexi/extra.c
@@ -54,7 +54,9 @@ add_extra_element (ELEMENT *e, char *key, ELEMENT *value)
 }
 
 /* Add an extra key that is a reference to another element that is
-   out-of-tree, i.e., not referenced anywhere in the tree. */
+   out-of-tree, i.e., not referenced anywhere in the tree.
+   Unused in 2023.
+*/
 void
 add_extra_element_oot (ELEMENT *e, char *key, ELEMENT *value)
 {
@@ -82,13 +84,6 @@ add_extra_contents_oot (ELEMENT *e, char *key, ELEMENT 
*value)
   add_associated_info_key (e->extra_info, key, value, extra_contents_oot);
 }
 
-/* An array of content arrays. */
-void
-add_extra_contents_array (ELEMENT *e, char *key, ELEMENT *value)
-{
-  add_associated_info_key (e->extra_info, key, value, extra_contents_array);
-}
-
 /* Add an extra key that is a reference to the text field of another
    element. */
 void
@@ -97,16 +92,6 @@ add_extra_text (ELEMENT *e, char *key, ELEMENT *value)
   add_associated_info_key (e->extra_info, key, value, extra_text);
 }
 
-#if 0
-/* Function not used */
-void
-add_extra_index_entry (ELEMENT *e, char *key, INDEX_ENTRY_REF *value)
-{
-  add_associated_info_key (e->extra_info, key, (ELEMENT *) value,
-                           extra_index_entry);
-}
-#endif
-
 void
 add_extra_misc_args (ELEMENT *e, char *key, ELEMENT *value)
 {
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index e6a63ef179..96eef5e7be 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -226,7 +226,6 @@ void add_extra_element (ELEMENT *e, char *key, ELEMENT 
*value);
 void add_extra_element_oot (ELEMENT *e, char *key, ELEMENT *value);
 void add_extra_contents (ELEMENT *e, char *key, ELEMENT *value);
 void add_extra_contents_oot (ELEMENT *e, char *key, ELEMENT *value);
-void add_extra_contents_array (ELEMENT *e, char *key, ELEMENT *value);
 void add_extra_text (ELEMENT *e, char *key, ELEMENT *value);
 void add_extra_misc_args (ELEMENT *e, char *key, ELEMENT *value);
 void add_extra_def_info (ELEMENT *e, char *key, DEF_INFO *value);
diff --git a/tp/Texinfo/XS/parsetexi/tree.c b/tp/Texinfo/XS/parsetexi/tree.c
index 64ffafd36d..b9dcb9f6ec 100644
--- a/tp/Texinfo/XS/parsetexi/tree.c
+++ b/tp/Texinfo/XS/parsetexi/tree.c
@@ -75,7 +75,6 @@ destroy_associated_info (ASSOCIATED_INFO *a)
       switch (a->info[i].type)
         {
         case extra_string:
-        case extra_index_entry:
           free (a->info[i].value);
           break;
         case extra_element_oot:
@@ -103,18 +102,6 @@ destroy_associated_info (ASSOCIATED_INFO *a)
             destroy_element (array);
             break;
           }
-        case extra_contents_array:
-          {
-            int j;
-            ELEMENT *array = a->info[i].value;
-            for (j = 0 ; j < array->contents.number; j++)
-              {
-                if (array->contents.list[j])
-                  destroy_element (array->contents.list[j]);
-              }
-            destroy_element (array);
-          break;
-          }
         case extra_misc_args:
           destroy_element_and_children (a->info[i].value);
           break;
diff --git a/tp/Texinfo/XS/parsetexi/tree_types.h 
b/tp/Texinfo/XS/parsetexi/tree_types.h
index a40973d1fd..123dd65433 100644
--- a/tp/Texinfo/XS/parsetexi/tree_types.h
+++ b/tp/Texinfo/XS/parsetexi/tree_types.h
@@ -27,9 +27,7 @@ enum extra_type {
     extra_element_oot,
     extra_contents,
     extra_contents_oot,
-    extra_contents_array,
     extra_text,
-    extra_index_entry,
     extra_misc_args,
     extra_string,
     extra_integer,



reply via email to

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