Overview
Comment: | vasprintf: Create a copy of arguments. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
c90e101c7c70e64ea6e29c4b5a76448e |
User & Date: | js on 2013-04-15 12:52:25 |
Other Links: | manifest | tags |
Context
2013-04-18
| ||
19:54 | Fix --disable-threads. check-in: c1f5396016 user: js tags: trunk | |
2013-04-15
| ||
12:52 | vasprintf: Create a copy of arguments. check-in: c90e101c7c user: js tags: trunk | |
2013-04-12
| ||
07:47 | OFXMLParser: Skip BOM. check-in: 9b1f138b09 user: js tags: trunk | |
Changes
Modified src/asprintf.m from [f5f60111d7] to [a685f3a1cc].
︙ | ︙ | |||
20 21 22 23 24 25 26 27 | #include <stdlib.h> #include <stdarg.h> int vasprintf(char **string, const char *format, va_list arguments) { int length; | > > > | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #include <stdlib.h> #include <stdarg.h> int vasprintf(char **string, const char *format, va_list arguments) { int length; va_list argumentsCopy; va_copy(argumentsCopy, argumentsCopy); if ((length = vsnprintf(NULL, 0, format, argumentsCopy)) < 0) return length; if ((*string = malloc((size_t)length + 1)) == NULL) return -1; return vsnprintf(*string, (size_t)length + 1, format, arguments); } |
︙ | ︙ |