Mercurial > hg > octave-nkf > gnulib-hg
changeset 17795:5c5dad428438
obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun
Problem reported by Alan Modra in:
http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00007.html
* lib/obstack.h (obstack_chunkfun, obstack_freefun):
Always cast the function arg, reverting this part of the previous
change.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 05 Nov 2014 11:41:57 -0800 |
parents | 300f68b55ab2 |
children | e6ce17a54483 |
files | ChangeLog lib/obstack.h |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-11-05 Paul Eggert <eggert@cs.ucla.edu> + + obstack: do not reject malloc-style obstack_chunkfun, obstack_freefun + Problem reported by Alan Modra in: + http://lists.gnu.org/archive/html/bug-gnulib/2014-11/msg00007.html + * lib/obstack.h (obstack_chunkfun, obstack_freefun): + Always cast the function arg, reverting this part of the previous + change. + 2014-11-04 Paul Eggert <eggert@cs.ucla.edu> obstack: avoid potentially-nonportable function casts
--- a/lib/obstack.h +++ b/lib/obstack.h @@ -257,12 +257,10 @@ _OBSTACK_CAST (void (*) (void *, void *), freefun), arg) #define obstack_chunkfun(h, newchunkfun) \ - ((void) ((h)->chunkfun.extra = _OBSTACK_CAST (void *(*) (void *, size_t), \ - newchunkfun))) + ((void) ((h)->chunkfun.extra = (void *(*) (void *, size_t)) (newchunkfun))) #define obstack_freefun(h, newfreefun) \ - ((void) ((h)->freefun.extra = _OBSTACK_CAST (void (*) (void *, void *), \ - newfreefun))) + ((void) ((h)->freefun.extra = (void *(*) (void *, void *)) (newfreefun))) #define obstack_1grow_fast(h, achar) ((void) (*((h)->next_free)++ = (achar)))