texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Sun, 29 Sep 2024 09:11:51 -0400 (EDT)

branch: master
commit f9c9a62c2cf0b7b426677f8ad7ab1b0eed6785be
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Jun 29 18:55:10 2024 +0200

    * tp/Texinfo/XS/main/build_perl_info.c (build_perl_array): rename e as
    e_l.
    
    * tp/Texinfo/XS/main/build_perl_info.c
    (build_perl_const_element_array, build_additional_info),
    tp/Texinfo/XS/main/debug.c (print_associate_info_debug),
    tp/Texinfo/XS/main/extra.c (add_extra_load, lookup_extra_load),
    tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info)
    (remove_associated_copy_info), tp/Texinfo/XS/main/tree.c
    (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h
    (enum extra_type, KEY_PAIR): add extra_load extra type with
    CONST_ELEMENT_LIST, add the const_list field in key pair union.
    Add build_perl_const_element_array to build Perl array from a
    CONST_ELEMENT_LIST.  Add handling of extra_load to
    print_associate_info_debug, destroy_associated_info and tree copy.
    Use it for section_childs and authors extra information. Update
    callers for those extra information keys.
---
 ChangeLog                                       | 20 ++++++++
 tp/Texinfo/XS/convert/convert_html.c            | 14 +++---
 tp/Texinfo/XS/main/build_perl_info.c            | 67 ++++++++++++++++++++++---
 tp/Texinfo/XS/main/debug.c                      | 14 ++++++
 tp/Texinfo/XS/main/extra.c                      | 35 +++++++++++++
 tp/Texinfo/XS/main/extra.h                      |  3 ++
 tp/Texinfo/XS/main/manipulate_tree.c            | 26 ++++++++++
 tp/Texinfo/XS/main/output_unit.c                |  8 +--
 tp/Texinfo/XS/main/tree.c                       |  3 ++
 tp/Texinfo/XS/main/tree_types.h                 |  2 +
 tp/Texinfo/XS/parsetexi/handle_commands.c       |  4 +-
 tp/Texinfo/XS/structuring_transfo/structuring.c | 41 +++++++--------
 12 files changed, 196 insertions(+), 41 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0eb9a2807f..e25d1d6a60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2024-06-29  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/build_perl_info.c (build_perl_array): rename e as
+       e_l.
+
+       * tp/Texinfo/XS/main/build_perl_info.c
+       (build_perl_const_element_array, build_additional_info),
+       tp/Texinfo/XS/main/debug.c (print_associate_info_debug),
+       tp/Texinfo/XS/main/extra.c (add_extra_load, lookup_extra_load),
+       tp/Texinfo/XS/main/manipulate_tree.c (copy_associated_info)
+       (remove_associated_copy_info), tp/Texinfo/XS/main/tree.c
+       (destroy_associated_info), tp/Texinfo/XS/main/tree_types.h
+       (enum extra_type, KEY_PAIR): add extra_load extra type with
+       CONST_ELEMENT_LIST, add the const_list field in key pair union.
+       Add build_perl_const_element_array to build Perl array from a
+       CONST_ELEMENT_LIST.  Add handling of extra_load to
+       print_associate_info_debug, destroy_associated_info and tree copy.
+       Use it for section_childs and authors extra information. Update
+       callers for those extra information keys.
+
 2024-06-29  Patrice Dumas  <pertusus@free.fr>
 
        Reindent enum declarations
diff --git a/tp/Texinfo/XS/convert/convert_html.c 
b/tp/Texinfo/XS/convert/convert_html.c
index b308be5472..668ea9db0f 100644
--- a/tp/Texinfo/XS/convert/convert_html.c
+++ b/tp/Texinfo/XS/convert/convert_html.c
@@ -6356,7 +6356,7 @@ html_default_format_contents (CONVERTER *self, const enum 
command_id cmd,
   const char *filename_from;
   int is_contents = (cmd == CM_contents);
   TEXT result;
-  const ELEMENT_LIST *root_children;
+  const CONST_ELEMENT_LIST *root_children;
   const ELEMENT *section_root;
   int min_root_level;
   int max_root_level;
@@ -6390,7 +6390,7 @@ html_default_format_contents (CONVERTER *self, const enum 
command_id cmd,
   else
     return result.text;
 
-  root_children = lookup_extra_contents (section_root, AI_key_section_childs);
+  root_children = lookup_extra_load (section_root, AI_key_section_childs);
   min_root_level = lookup_extra_integer (root_children->list[0],
                                          AI_key_section_level,
                                          &status);
@@ -6461,8 +6461,8 @@ html_default_format_contents (CONVERTER *self, const enum 
command_id cmd,
        {
          int section_level = lookup_extra_integer (section, 
AI_key_section_level,
                                                    &status);
-         const ELEMENT_LIST *section_childs
-           = lookup_extra_contents (section, AI_key_section_childs);
+         const CONST_ELEMENT_LIST *section_childs
+           = lookup_extra_load (section, AI_key_section_childs);
          if (section->e.c->cmd != CM_top)
             {
               char *text;
@@ -10271,7 +10271,7 @@ mini_toc_internal (CONVERTER *self, const ELEMENT 
*element, TEXT *result)
 {
   int entry_index = 0;
 
-  const ELEMENT_LIST *section_childs = lookup_extra_contents (element,
+  const CONST_ELEMENT_LIST *section_childs = lookup_extra_load (element,
                                                   AI_key_section_childs);
   if (section_childs && section_childs->number > 0)
     {
@@ -11721,7 +11721,7 @@ convert_quotation_command (CONVERTER *self, const enum 
command_id cmd,
                     const HTML_ARGS_FORMATTED *args_formatted,
                     const char *content, TEXT *result)
 {
-  const ELEMENT_LIST *authors;
+  const CONST_ELEMENT_LIST *authors;
 
   char *cancelled = html_cancel_pending_formatted_inline_content (self,
                                             builtin_command_name (cmd));
@@ -11764,7 +11764,7 @@ convert_quotation_command (CONVERTER *self, const enum 
command_id cmd,
         text_append (result, content);
     }
 
-  authors = lookup_extra_contents (element, AI_key_authors);
+  authors = lookup_extra_load (element, AI_key_authors);
   if (authors)
     {
       int i;
diff --git a/tp/Texinfo/XS/main/build_perl_info.c 
b/tp/Texinfo/XS/main/build_perl_info.c
index 178b8bd154..f26e388988 100644
--- a/tp/Texinfo/XS/main/build_perl_info.c
+++ b/tp/Texinfo/XS/main/build_perl_info.c
@@ -163,7 +163,7 @@ void element_to_perl_hash (ELEMENT *e, int avoid_recursion);
    information where build_perl_array is called.
  */
 static SV *
-build_perl_array (const ELEMENT_LIST *e, int avoid_recursion)
+build_perl_array (const ELEMENT_LIST *e_l, int avoid_recursion)
 {
   SV *sv;
   AV *av;
@@ -174,19 +174,19 @@ build_perl_array (const ELEMENT_LIST *e, int 
avoid_recursion)
   av = newAV ();
   sv = newRV_inc ((SV *) av);
 
-  for (i = 0; i < e->number; i++)
+  for (i = 0; i < e_l->number; i++)
     {
-      if (!e->list[i]->hv)
+      if (!e_l->list[i]->hv)
         {
-          if (e->list[i]->parent)
-            e->list[i]->hv = newHV ();
+          if (e_l->list[i]->parent)
+            e_l->list[i]->hv = newHV ();
           else
             {
               /* NOTE should not be possible, all the elements in
                  extra_contents should be in-tree.  Checked in 2023.
                */
               static TEXT message;
-              char *debug_str = print_element_debug (e->list[i], 1);
+              char *debug_str = print_element_debug (e_l->list[i], 1);
               text_init (&message);
               text_printf (&message,
                 "BUG: build_perl_array oot %d: %s\n", i, debug_str);
@@ -197,10 +197,54 @@ build_perl_array (const ELEMENT_LIST *e, int 
avoid_recursion)
               free (message.text);
               /* Out-of-tree element */
               /* WARNING: This is possibly recursive. */
-              element_to_perl_hash (e->list[i], avoid_recursion);
+              element_to_perl_hash (e_l->list[i], avoid_recursion);
             }
         }
-      av_store (av, i, newRV_inc ((SV *) e->list[i]->hv));
+      av_store (av, i, newRV_inc ((SV *) e_l->list[i]->hv));
+    }
+  return sv;
+}
+
+static SV *
+build_perl_const_element_array (const CONST_ELEMENT_LIST *e_l, int 
avoid_recursion)
+{
+  SV *sv;
+  AV *av;
+  int i;
+
+  dTHX;
+
+  av = newAV ();
+  sv = newRV_inc ((SV *) av);
+
+  for (i = 0; i < e_l->number; i++)
+    {
+      if (!e_l->list[i]->hv)
+        {
+          ELEMENT *f = (ELEMENT *)e_l->list[i];
+          if (f->parent)
+            f->hv = newHV ();
+          else
+            {
+              /* NOTE should not be possible, all the elements in
+                 extra_contents should be in-tree.  Checked in 2023.
+               */
+              static TEXT message;
+              char *debug_str = print_element_debug (f, 1);
+              text_init (&message);
+              text_printf (&message,
+                "BUG: build_perl_const_element_array oot %d: %s\n", i, 
debug_str);
+      /* Calling free in this file on data possibly allocated with gnulib
+         is not ok in general, but ok here, as it should never be called */
+              free (debug_str);
+              fprintf (stderr, "%s", message.text);
+              free (message.text);
+              /* Out-of-tree element */
+              /* WARNING: This is possibly recursive. */
+              element_to_perl_hash (f, avoid_recursion);
+            }
+        }
+      av_store (av, i, newRV_inc ((SV *) e_l->list[i]->hv));
     }
   return sv;
 }
@@ -366,6 +410,13 @@ build_additional_info (HV *extra, const ASSOCIATED_INFO *a,
                 STORE(build_perl_array (l, avoid_recursion));
               break;
               }
+            case extra_load:
+              {
+              const CONST_ELEMENT_LIST *l = k->k.const_list;
+              if (l && l->number)
+                STORE(build_perl_const_element_array (l, avoid_recursion));
+              break;
+              }
             case extra_directions:
               {
               STORE(build_perl_directions (k->k.directions, avoid_recursion));
diff --git a/tp/Texinfo/XS/main/debug.c b/tp/Texinfo/XS/main/debug.c
index 960579a068..53ddb76afc 100644
--- a/tp/Texinfo/XS/main/debug.c
+++ b/tp/Texinfo/XS/main/debug.c
@@ -185,6 +185,20 @@ print_associate_info_debug (const ASSOCIATED_INFO *info)
               }
             break;
           }
+        case extra_load:
+          {
+            int j;
+            const CONST_ELEMENT_LIST *l = k->k.const_list;
+            text_append (&text, "load: ");
+            for (j = 0; j < l->number; j++)
+              {
+                const ELEMENT *e = l->list[j];
+                char *element_str = print_element_debug (e, 0);
+                text_printf (&text, "%p;%s|", e, element_str);
+                free (element_str);
+              }
+            break;
+          }
         case extra_directions:
           {
             int d;
diff --git a/tp/Texinfo/XS/main/extra.c b/tp/Texinfo/XS/main/extra.c
index 6ee8dd35fb..0ab1802c60 100644
--- a/tp/Texinfo/XS/main/extra.c
+++ b/tp/Texinfo/XS/main/extra.c
@@ -122,6 +122,24 @@ add_extra_contents (ELEMENT *e, enum ai_key_name key, int 
no_lookup)
   return n_list;
 }
 
+CONST_ELEMENT_LIST *
+add_extra_load (ELEMENT *e, enum ai_key_name key, int no_lookup)
+{
+  CONST_ELEMENT_LIST *n_list;
+  if (!no_lookup)
+    {
+      CONST_ELEMENT_LIST *e_list = lookup_extra_load (e, key);
+      if (e_list)
+        return e_list;
+    }
+
+  n_list = new_const_element_list ();
+  KEY_PAIR *k = get_associated_info_key (&e->e.c->extra_info, key,
+                                         extra_load);
+  k->k.const_list = n_list;
+  return n_list;
+}
+
 /* Holds 3 elements corresponding to directions in enum directions.
 
   The elements are set const because directions are set after the tree is
@@ -332,6 +350,23 @@ lookup_extra_contents (const ELEMENT *e, enum ai_key_name 
key)
   return k->k.list;
 }
 
+CONST_ELEMENT_LIST *
+lookup_extra_load (const ELEMENT *e, enum ai_key_name key)
+{
+  KEY_PAIR *k = lookup_extra (e, key);
+  if (!k)
+    return 0;
+  else if (k->type != extra_load)
+    {
+      char *msg;
+      xasprintf (&msg, "Bad type for lookup_extra_load: %s: %d",
+                 ai_key_names[key], k->type);
+      fatal (msg);
+      free (msg);
+    }
+  return k->k.const_list;
+}
+
 const ELEMENT **
 lookup_extra_directions (const ELEMENT *e, enum ai_key_name key)
 {
diff --git a/tp/Texinfo/XS/main/extra.h b/tp/Texinfo/XS/main/extra.h
index 4a3a4a7c1d..bfe161be50 100644
--- a/tp/Texinfo/XS/main/extra.h
+++ b/tp/Texinfo/XS/main/extra.h
@@ -23,6 +23,8 @@ void add_extra_element (ELEMENT *e, enum ai_key_name key, 
ELEMENT *value);
 void add_extra_element_oot (ELEMENT *e, enum ai_key_name key, ELEMENT *value);
 ELEMENT_LIST *add_extra_contents (ELEMENT *e, enum ai_key_name key,
                                   int no_lookup);
+CONST_ELEMENT_LIST *add_extra_load (ELEMENT *e, enum ai_key_name key,
+                                    int no_lookup);
 void add_extra_container (ELEMENT *e, enum ai_key_name key, ELEMENT *value);
 const ELEMENT **add_extra_directions (ELEMENT *e,
                                                 enum ai_key_name key);
@@ -37,6 +39,7 @@ ELEMENT *lookup_extra_element (const ELEMENT *e, enum 
ai_key_name key);
 ELEMENT *lookup_extra_element_oot (const ELEMENT *e, enum ai_key_name key);
 ELEMENT *lookup_extra_container (const ELEMENT *e, enum ai_key_name key);
 ELEMENT_LIST *lookup_extra_contents (const ELEMENT *e, enum ai_key_name key);
+CONST_ELEMENT_LIST * lookup_extra_load (const ELEMENT *e, enum ai_key_name 
key);
 const STRING_LIST *lookup_extra_misc_args (const ELEMENT *e,
                                            enum ai_key_name key);
 const INDEX_ENTRY_LOCATION *lookup_extra_index_entry (const ELEMENT *e,
diff --git a/tp/Texinfo/XS/main/manipulate_tree.c 
b/tp/Texinfo/XS/main/manipulate_tree.c
index ca91864ba3..f6b4aefde6 100644
--- a/tp/Texinfo/XS/main/manipulate_tree.c
+++ b/tp/Texinfo/XS/main/manipulate_tree.c
@@ -85,6 +85,21 @@ copy_associated_info (ASSOCIATED_INFO *info, 
ASSOCIATED_INFO* new_info)
             }
           break;
           }
+        case extra_load:
+          {
+          KEY_PAIR *k = get_associated_info_key (new_info, key, k_ref->type);
+          CONST_ELEMENT_LIST *new_extra_load = new_const_element_list ();
+          k->k.const_list = new_extra_load;
+          for (j = 0; j < k_ref->k.const_list->number; j++)
+            {
+              /* cast to discard const, as the element needs to be modified
+                 transiently for copy */
+              ELEMENT *e = (ELEMENT *)k_ref->k.const_list->list[j];
+              ELEMENT *copy = copy_tree_internal (e);
+              add_to_const_element_list (new_extra_load, copy);
+            }
+          break;
+          }
         case extra_directions:
           {
           KEY_PAIR *k = get_associated_info_key (new_info, key, k_ref->type);
@@ -268,6 +283,17 @@ remove_associated_copy_info (ASSOCIATED_INFO *info)
               }
             break;
           }
+        case extra_load:
+          {
+            for (j = 0; j < k_ref->k.const_list->number; j++)
+              {
+              /* cast to discard const, as the element needs to be modified
+                 transiently for copy */
+                ELEMENT *e = (ELEMENT *)k_ref->k.const_list->list[j];
+                remove_element_copy_info (e);
+              }
+            break;
+          }
         case extra_directions:
           {
             for (j = 0; j < directions_length; j++)
diff --git a/tp/Texinfo/XS/main/output_unit.c b/tp/Texinfo/XS/main/output_unit.c
index bbb87a0b3a..8f10b115cf 100644
--- a/tp/Texinfo/XS/main/output_unit.c
+++ b/tp/Texinfo/XS/main/output_unit.c
@@ -633,9 +633,9 @@ units_directions (const LABEL_LIST *identifiers_target,
               int automatic_directions = (node->e.c->args.number <= 1);
               const ELEMENT *associated_section = lookup_extra_element (node,
                                                    AI_key_associated_section);
-              const ELEMENT_LIST *section_childs = 0;
+              const CONST_ELEMENT_LIST *section_childs = 0;
               if (associated_section)
-                section_childs = lookup_extra_contents (associated_section,
+                section_childs = lookup_extra_load (associated_section,
                                                      AI_key_section_childs);
               if (automatic_directions
                   && section_childs && section_childs->number > 0)
@@ -738,7 +738,7 @@ units_directions (const LABEL_LIST *identifiers_target,
       else
         {
           const ELEMENT *up = section;
-          const ELEMENT_LIST *up_section_childs;
+          const CONST_ELEMENT_LIST *up_section_childs;
           int up_section_level;
           int status;
           enum directions d;
@@ -785,7 +785,7 @@ units_directions (const LABEL_LIST *identifiers_target,
                 break;
             }
 
-          up_section_childs = lookup_extra_contents (up, 
AI_key_section_childs);
+          up_section_childs = lookup_extra_load (up, AI_key_section_childs);
           if (status >= 0 && up_section_level < 1
               && up->e.c->cmd == CM_top && up_section_childs
               && up_section_childs->number > 0)
diff --git a/tp/Texinfo/XS/main/tree.c b/tp/Texinfo/XS/main/tree.c
index 181655ceeb..0649deae51 100644
--- a/tp/Texinfo/XS/main/tree.c
+++ b/tp/Texinfo/XS/main/tree.c
@@ -196,6 +196,9 @@ destroy_associated_info (ASSOCIATED_INFO *a)
         case extra_contents:
           destroy_list (k_pair->k.list);
           break;
+        case extra_load:
+          destroy_const_element_list (k_pair->k.const_list);
+          break;
         case extra_directions:
           free (k_pair->k.directions);
           break;
diff --git a/tp/Texinfo/XS/main/tree_types.h b/tp/Texinfo/XS/main/tree_types.h
index 6aede0f18d..43db4768ae 100644
--- a/tp/Texinfo/XS/main/tree_types.h
+++ b/tp/Texinfo/XS/main/tree_types.h
@@ -27,6 +27,7 @@ enum extra_type {
    extra_element,
    extra_element_oot,
    extra_contents,
+   extra_load,
    extra_container,
    extra_directions,
    extra_misc_args,
@@ -245,6 +246,7 @@ typedef struct KEY_PAIR {
     union {
       struct ELEMENT *element;
       ELEMENT_LIST *list;
+      CONST_ELEMENT_LIST *const_list;
       char *string;
       int integer;
       INDEX_ENTRY_LOCATION *index_entry;
diff --git a/tp/Texinfo/XS/parsetexi/handle_commands.c 
b/tp/Texinfo/XS/parsetexi/handle_commands.c
index ee8711a649..eee8746bdc 100644
--- a/tp/Texinfo/XS/parsetexi/handle_commands.c
+++ b/tp/Texinfo/XS/parsetexi/handle_commands.c
@@ -953,9 +953,9 @@ handle_line_command (ELEMENT *current, const char 
**line_inout,
               else if (parent->e.c->cmd == CM_quotation
                        || parent->e.c->cmd == CM_smallquotation)
                 {
-                  ELEMENT_LIST *l = add_extra_contents (parent,
+                  CONST_ELEMENT_LIST *l = add_extra_load (parent,
                                                         AI_key_authors, 0);
-                  add_to_element_list (l, current);
+                  add_to_const_element_list (l, current);
                   add_extra_element (current, AI_key_quotation, parent);
                   found = 1; break;
                 }
diff --git a/tp/Texinfo/XS/structuring_transfo/structuring.c 
b/tp/Texinfo/XS/structuring_transfo/structuring.c
index 0b830eecd4..1f622b9567 100644
--- a/tp/Texinfo/XS/structuring_transfo/structuring.c
+++ b/tp/Texinfo/XS/structuring_transfo/structuring.c
@@ -135,8 +135,8 @@ sectioning_structure (DOCUMENT *document)
             {
               const ELEMENT **section_directions
                   = add_extra_directions (content, AI_key_section_directions);
-              ELEMENT_LIST *section_childs
-                = add_extra_contents (previous_section,
+              CONST_ELEMENT_LIST *section_childs
+                = add_extra_load (previous_section,
                                       AI_key_section_childs, 1);
               if (level - prev_section_level > 1)
                 {
@@ -145,7 +145,7 @@ sectioning_structure (DOCUMENT *document)
                                  builtin_command_name (content->e.c->cmd));
                   level = prev_section_level + 1;
                 }
-              add_to_element_list (section_childs, content);
+              add_to_const_element_list (section_childs, content);
               section_directions[D_up] = previous_section;
                /*
                 if the up is unnumbered, the number information has to be kept,
@@ -231,20 +231,21 @@ sectioning_structure (DOCUMENT *document)
                   In that case the root level has to be updated because the
                   first 'part' just appeared, no direction to set.
                    */
-                  ELEMENT_LIST *sec_root_childs
-                    = lookup_extra_contents (sec_root, AI_key_section_childs);
+                  CONST_ELEMENT_LIST *sec_root_childs
+                    = lookup_extra_load (sec_root, AI_key_section_childs);
                   add_extra_integer (sec_root, AI_key_section_level, level -1);
-                  add_to_element_list (sec_root_childs, content);
+                  add_to_const_element_list (sec_root_childs, content);
                   number_top_level = level;
                   if (number_top_level == 0)
                     number_top_level = 1;
                 }
               else
                 {
-                  ELEMENT_LIST *up_section_childs
-                    = lookup_extra_contents (up, AI_key_section_childs);
-                  ELEMENT *prev
-                    = up_section_childs->list[up_section_childs->number -1];
+                  CONST_ELEMENT_LIST *up_section_childs
+                    = lookup_extra_load (up, AI_key_section_childs);
+                  /* cast to remove const to be able to set directions */
+                  ELEMENT *prev = (ELEMENT *)
+                    up_section_childs->list[up_section_childs->number -1];
                   const ELEMENT **prev_section_directions
                     = add_extra_directions (prev, AI_key_section_directions);
                   const ELEMENT **section_directions
@@ -254,7 +255,7 @@ sectioning_structure (DOCUMENT *document)
                     section_directions[D_up] = up;
                   section_directions[D_prev] = prev;
                   prev_section_directions[D_next] = content;
-                  add_to_element_list (up_section_childs, content);
+                  add_to_const_element_list (up_section_childs, content);
                 }
               if (!(command_other_flags (content) & CF_unnumbered))
                 {
@@ -270,12 +271,12 @@ sectioning_structure (DOCUMENT *document)
       else
         {
           sec_root = new_element (ET_NONE);
-          ELEMENT_LIST *sec_root_childs
-            = add_extra_contents (sec_root, AI_key_section_childs, 1);
+          CONST_ELEMENT_LIST *sec_root_childs
+            = add_extra_load (sec_root, AI_key_section_childs, 1);
            /* first section determines the level of the root.  It is
               typically -1 when there is a @top. */
           add_extra_integer (sec_root, AI_key_section_level, level -1);
-          add_to_element_list (sec_root_childs, content);
+          add_to_const_element_list (sec_root_childs, content);
            /*
             in the tree as an out of tree element in extra */
           add_extra_element_oot (content, AI_key_sectioning_root, sec_root);
@@ -461,8 +462,8 @@ get_node_node_childs_from_sectioning (const ELEMENT *node)
     = lookup_extra_element (node, AI_key_associated_section);
   if (associated_section)
     {
-      const ELEMENT_LIST *section_childs
-                   = lookup_extra_contents (associated_section,
+      const CONST_ELEMENT_LIST *section_childs
+                   = lookup_extra_load (associated_section,
                                             AI_key_section_childs);
       if (section_childs)
         {
@@ -492,8 +493,8 @@ get_node_node_childs_from_sectioning (const ELEMENT *node)
                   current = section_directions[D_next];
                   if (current->e.c->cmd == CM_part)
                     {
-                      const ELEMENT_LIST *section_childs
-                       = lookup_extra_contents (current, 
AI_key_section_childs);
+                      const CONST_ELEMENT_LIST *section_childs
+                       = lookup_extra_load (current, AI_key_section_childs);
                       if (section_childs)
                         {
                           int i;
@@ -1390,8 +1391,8 @@ nodes_tree (DOCUMENT *document)
               = lookup_extra_element (node, AI_key_associated_section);
             if (section)
               {
-                const ELEMENT_LIST *section_childs
-                  = lookup_extra_contents (section, AI_key_section_childs);
+                const CONST_ELEMENT_LIST *section_childs
+                  = lookup_extra_load (section, AI_key_section_childs);
                 if (section_childs && section_childs->number > 0)
                   {
                     const ELEMENT *first_sec = section_childs->list[0];



reply via email to

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