This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Speedups/Cleanups: End of GSOC patch collection


Hi, these are the type-safe obstack macros that I use in other patches. As requested, I also changed XOBFINISH to return (T *) and changed all callers, felt a little strange to change (char *) to char. I also replaced all _obstack_begin() calls in libcpp with obstack_init() which is the documented way of allocating macros.


2012-08-18 Dimitrios Apostolou <jimis@gmx.net>


	* include/libiberty.h (XOBDELETE, XOBGROW, XOBGROWVEC, XOBSHRINK)
	(XOBSHRINKVEC, XOBFINISH): New type-safe macros for obstack
	operations.
	(XOBFINISH): Changed to return (T *) instead of T. All callers
	updated.
	* libcpp/include/symtab.h (obstack_chunk_alloc)
	(obstack_chunk_free): Define, so that obstack_init() can be used.
	* libcpp/internal.h (struct cset_converter): Same.
	* libcpp/files.c (_cpp_init_files): Changed _obstack_begin() to
	obstack_init().
	* libcpp/identifiers.c (_cpp_init_hashtable): Same.
	* libcpp/symtab.c (ht_create): Same.
	* libcpp/init.c (cpp_create_reader): Same.



Thanks,
Dimitris

Attachment: obstacks.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]