]> Savannah Git Hosting - gnulib.git/commit
obstack: avoid potentially-nonportable function casts
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Nov 2014 08:31:31 +0000 (00:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 4 Nov 2014 08:33:36 +0000 (00:33 -0800)
commit127ed6a3ea9c46452f079dee50382dc1f70ea796
tree237eac567ecf7b2f0961057eebaffb6303310123
parentd15b2da0ac25e085ce30a9e2672624999ce910a6
obstack: avoid potentially-nonportable function casts

* lib/obstack.c (CALL_CHUNKFUN, CALL_FREEFUN):
Remove, replacing with ...
(call_chunkfun, call_freefun): New static functions.
All uses changed.  Avoid potentially-nonportable casts.
(chunkfun_type, freefun_type): Remove typedefs; no longer used.
(_obstack_begin_worker): Omit last two args, since they
rely on potentially-nonportable casts.  All callers changed.
* lib/obstack.h (_OBSTACK_CAST): New macro.
Use it everywhere the old API used a potentially-nonportable cast.
The new API doesn't cast.
(struct obstack): Use unions rather than requiring
potentially-nonportable casts.
(obstack_chunkfun, obstack_freefun): Return void.
ChangeLog
lib/obstack.c
lib/obstack.h