]> Savannah Git Hosting - gnulib.git/commit
obstack: 64-bit obstack support, part 1
authorAlan Modra <amodra@gmail.com>
Wed, 29 Oct 2014 03:32:31 +0000 (14:02 +1030)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 29 Oct 2014 07:23:38 +0000 (00:23 -0700)
commit266ac1b98dbf76a78cdc584b10ed73355a084e7a
treed05f59d8885af49e3e8d336c4321c0b4ac233c6d
parent8216dffc279801576da195c4a259f4ed2f00b230
obstack: 64-bit obstack support, part 1

a) Correct calls to alloc function, to use a size_t arg.  "long" is
   just wrong on targets like x86_64-mingw64 where "long" is 32 bits
   and "size_t" 64 bits.
b) Consolidate _obstack_begin and _obstack_begin1 code.

* lib/obstack.h (struct obstack <chunkfun>): Correct prototype to
use "size_t" rather than "long".
(_obstack_begin, _obstack_begin1): Likewise.
(obstack_init, obstack_begin, obstack_specify_allocation_with_arg,
obstack_chunkfun): Update alloc function casts.
* lib/obstack.c (CALL_CHUNKFUN): Update chunkfun cast.
(chunkfun_type, freefun_type): New typdefs.
(_obstack_begin_worker): Split out from ..
(_obstack_begin, _obstack_begin_1): ..here.
lib/obstack.c
lib/obstack.h