diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2014-11-05 11:41:57 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2014-11-05 11:42:24 -0800 |
commit | ed253cd8e51e0d6dddc9c80dfbb592400a370c34 (patch) | |
tree | bd610bc9200c4ffdaee1a2f84f0b1b1b2f14bafe /lib/obstack.h | |
parent | 269a0fae57982b2e05968c098de161187e62c718 (diff) | |
download | gnulib-ed253cd8e51e0d6dddc9c80dfbb592400a370c34.tar.gz |
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.
Diffstat (limited to 'lib/obstack.h')
-rw-r--r-- | lib/obstack.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/obstack.h b/lib/obstack.h index 7b6dee8013..befe1c255f 100644 --- a/lib/obstack.h +++ b/lib/obstack.h @@ -257,12 +257,10 @@ extern int obstack_exit_failure; _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))) |