[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parset
From: |
Patrice Dumas |
Subject: |
branch master updated: * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): remove the noop reset_obstacks function, remove comments related to obstack. |
Date: |
Thu, 14 Nov 2024 04:42:38 -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 579a7b8a7d * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c
(initialize_parsing): remove the noop reset_obstacks function, remove comments
related to obstack.
579a7b8a7d is described below
commit 579a7b8a7dbb9caf0dc63fb87b3535a905db4ba6
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Nov 14 10:42:32 2024 +0100
* tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c
(initialize_parsing): remove the noop reset_obstacks function, remove
comments related to obstack.
---
ChangeLog | 6 ++++++
tp/Texinfo/XS/main/tree.c | 41 +----------------------------------------
tp/Texinfo/XS/main/tree.h | 2 --
tp/Texinfo/XS/parsetexi/api.c | 4 +---
4 files changed, 8 insertions(+), 45 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8db160a3c0..4547105b4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-14 Patrice Dumas <pertusus@free.fr>
+
+ * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c
+ (initialize_parsing): remove the noop reset_obstacks function, remove
+ comments related to obstack.
+
2024-11-13 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/XS: run
diff --git a/tp/Texinfo/XS/main/tree.c b/tp/Texinfo/XS/main/tree.c
index 4fad701d2f..5e43f34493 100644
--- a/tp/Texinfo/XS/main/tree.c
+++ b/tp/Texinfo/XS/main/tree.c
@@ -14,33 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
+
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
-/* TODO obstack is not used as it requires any code adding element to
- be able to access the struct obstack. The struct obstack could
- be allocated on the heap and be available in the parser. It could
- also be passed to the parsed document but it seems complicated to
- make it available to alloc_element outside of the parser (more
- precisely after parse_texi has returned), in code related to
- tree modification and conversion.
-
- If obstack is used again, in addition to the obvious changes,
- code following
- freed in reset_obstacks
- should be commented out.
-
-
-#include "obstack.h"
-
-static struct obstack obs_element;
-static int *obs_element_first = 0;
-
-#define obstack_chunk_alloc malloc
-#define obstack_chunk_free free
- */
-
#include "tree_types.h"
#include "types_data.h"
/* for fatal */
@@ -67,26 +45,9 @@ const char *ai_key_names[] = {
#undef ai_key
};
-void
-reset_obstacks (void)
-{
- /* obstacks not used
-
- if (obs_element_first)
- obstack_free (&obs_element, obs_element_first);
- else
- obstack_init (&obs_element);
-
- obs_element_first = obstack_alloc (&obs_element, sizeof (int));
- */
-}
-
static ELEMENT *alloc_element (void)
{
ELEMENT *e;
- /*
- e = (ELEMENT *) obstack_alloc (&obs_element, sizeof (ELEMENT));
- */
e = (ELEMENT *) malloc (sizeof (ELEMENT));
memset (e, 0, sizeof (ELEMENT));
return e;
diff --git a/tp/Texinfo/XS/main/tree.h b/tp/Texinfo/XS/main/tree.h
index b12f8112dc..e879d98299 100644
--- a/tp/Texinfo/XS/main/tree.h
+++ b/tp/Texinfo/XS/main/tree.h
@@ -10,8 +10,6 @@ extern const char *ai_key_names[];
/* Array of elt_info key names. */
extern const char *elt_info_names[];
-void reset_obstacks (void);
-
ASSOCIATED_INFO *new_associated_info (void);
ELEMENT *new_element (enum element_type type);
ELEMENT *new_command_element (enum element_type type, enum command_id cmd);
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 44469a6b95..5cf19d4f15 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -24,7 +24,7 @@
#include "global_commands_types.h"
#include "tree_types.h"
-/* reset_obstacks */
+/* new_element */
#include "tree.h"
/* for wipe_values ... */
#include "utils.h"
@@ -99,8 +99,6 @@ initialize_parsing (enum context root_ct)
memset (&nesting_context, 0, sizeof (nesting_context));
reset_parser_counters ();
- reset_obstacks ();
-
return parsed_document->descriptor;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * tp/Texinfo/XS/main/tree.c, tp/Texinfo/XS/parsetexi/api.c (initialize_parsing): remove the noop reset_obstacks function, remove comments related to obstack.,
Patrice Dumas <=