[Top][All Lists]

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

[Bug-gnulib] obstack cleanup for gnulib

From: Paul Eggert
Subject: [Bug-gnulib] obstack cleanup for gnulib
Date: Wed, 19 May 2004 13:05:29 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I installed the following obvious patch.  I'll also submit it to glibc.

2004-05-19  Paul Eggert  <address@hidden>

        * obstack.c (_obstack): Remove unused variable.  It hasn't been
        present in glibc since revision 1.1 of this file.
        * obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
        obstack_alignment_mask, obstack_alloc, obstack_base,
        obstack_blank, obstack_blank_fast, obstack_chunk_size,
        obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
        obstack_grow0, obstack_init, obstack_int_grow,
        obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
        obstack_next_free, obstack_object_size, obstack_ptr_grow,
        obstack_ptr_grow_fast, obstack_room): Remove declarations of
        nonexistent functions.

Index: lib/obstack.c
RCS file: /cvsroot/gnulib/gnulib/lib/obstack.c,v
retrieving revision 1.25
diff -p -u -r1.25 obstack.c
--- lib/obstack.c       17 May 2004 07:52:52 -0000      1.25
+++ lib/obstack.c       19 May 2004 20:00:32 -0000
@@ -102,11 +102,6 @@ int obstack_exit_failure = EXIT_FAILURE;
 #  define obstack_exit_failure exit_failure
 # endif
-/* The non-GNU-C macros copy the obstack into this global variable
-   to avoid multiple evaluation.  */
-struct obstack *_obstack;
 /* Define a macro that either calls functions with the traditional malloc/free
    calling interface, or calls functions with the mmalloc/mfree interface
    (that adds an extra first argument), based on the state of use_extra_arg.
Index: lib/obstack.h
RCS file: /cvsroot/gnulib/gnulib/lib/obstack.h,v
retrieving revision 1.27
diff -p -u -r1.27 obstack.h
--- lib/obstack.h       17 May 2004 07:52:52 -0000      1.27
+++ lib/obstack.h       19 May 2004 20:00:33 -0000
@@ -183,52 +183,16 @@ struct obstack            /* control current objec
 /* Declare the external functions we use; they are in obstack.c.  */
 extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
 extern int _obstack_begin (struct obstack *, int, int,
                            void *(*) (long), void (*) (void *));
 extern int _obstack_begin_1 (struct obstack *, int, int,
                             void *(*) (void *, long),
                             void (*) (void *, void *), void *);
 extern int _obstack_memory_used (struct obstack *);
-/* Do the function-declarations after the structs
-   but before defining the macros.  */
-void obstack_init (struct obstack *obstack);
-void * obstack_alloc (struct obstack *obstack, int size);
-void * obstack_copy (struct obstack *obstack, const void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, const void *address, int size);
 void obstack_free (struct obstack *obstack, void *block);
-void obstack_blank (struct obstack *obstack, int size);
-void obstack_grow (struct obstack *obstack, const void *data, int size);
-void obstack_grow0 (struct obstack *obstack, const void *data, int size);
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, const void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-void * obstack_finish (struct obstack *obstack);
-int obstack_object_size (struct obstack *obstack);
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, const void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
 /* Error handler called when `obstack_chunk_alloc' failed to allocate
    more memory.  This can be set to a user defined function which
    should either abort gracefully or use longjump - but shouldn't

reply via email to

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