diff options
author | Bruno Haible <bruno@clisp.org> | 2011-02-04 19:22:43 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-02-04 19:22:43 +0100 |
commit | 8c6ae0f8ac5b35f5237375dfe748300544711701 (patch) | |
tree | 015202934c1905796185ec1eefff89020454544a /ChangeLog | |
parent | b6b8999acb7d09d22a2ea4809ec4de041d761f05 (diff) | |
download | gnulib-8c6ae0f8ac5b35f5237375dfe748300544711701.tar.gz |
vasnprintf: Reduce use of malloc for small format strings.
* lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro.
(arguments): Add room for the first 7 arguments.
* lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro.
(char_directives, u8_directives, u16_directives, u32_directives): Add
room for the first 7 directives.
* lib/printf-parse.c: Include <string.h>.
(PRINTF_PARSE): Change memory handling code so that it uses the first
7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct.
* lib/vasnprintf.c (VASNPRINTF): Update memory handling code.
Reported by Pádraig Brady <P@draigbrady.com>.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,17 @@ +2011-02-04 Bruno Haible <bruno@clisp.org> + + vasnprintf: Reduce use of malloc for small format strings. + * lib/printf-args.h (N_DIRECT_ALLOC_ARGUMENTS): New macro. + (arguments): Add room for the first 7 arguments. + * lib/printf-parse.h (N_DIRECT_ALLOC_DIRECTIVES): New macro. + (char_directives, u8_directives, u16_directives, u32_directives): Add + room for the first 7 directives. + * lib/printf-parse.c: Include <string.h>. + (PRINTF_PARSE): Change memory handling code so that it uses the first + 7 preallocated elements in an 'arguments' or 'DIRECTIVES' struct. + * lib/vasnprintf.c (VASNPRINTF): Update memory handling code. + Reported by Pádraig Brady <P@draigbrady.com>. + 2011-01-31 Eric Blake <eblake@redhat.com> dup2: work around Haiku bug |