projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefiles: Make a couple of targets build more quietly.
[pspp]
/
src
/
libpspp
/
pool.c
diff --git
a/src/libpspp/pool.c
b/src/libpspp/pool.c
index 3150c9056b2eb8c91b42662fddf2c590263a9455..a1979abc81b5d68b5916b56c590c6dcfd3f94580 100644
(file)
--- a/
src/libpspp/pool.c
+++ b/
src/libpspp/pool.c
@@
-26,6
+26,7
@@
#include "libpspp/temp-file.h"
#include "libpspp/str.h"
#include "libpspp/temp-file.h"
#include "libpspp/str.h"
+#include "gl/xalloc-oversized.h"
#include "gl/xalloc.h"
/* Fast, low-overhead memory block suballocator. */
#include "gl/xalloc.h"
/* Fast, low-overhead memory block suballocator. */
@@
-381,7
+382,7
@@
pool_strdup (struct pool *pool, const char *string)
strings, because the returned pointere may not be aligned
properly for other types. */
char *
strings, because the returned pointere may not be aligned
properly for other types. */
char *
-pool_
str
dup0 (struct pool *pool, const char *string, size_t size)
+pool_
mem
dup0 (struct pool *pool, const char *string, size_t size)
{
char *new_string = pool_alloc_unaligned (pool, size + 1);
memcpy (new_string, string, size);
{
char *new_string = pool_alloc_unaligned (pool, size + 1);
memcpy (new_string, string, size);
@@
-394,6
+395,9
@@
pool_strdup0 (struct pool *pool, const char *string, size_t size)
char *
pool_vasprintf (struct pool *pool, const char *format, va_list args_)
{
char *
pool_vasprintf (struct pool *pool, const char *format, va_list args_)
{
+ if (!pool)
+ return xvasprintf (format, args_);
+
struct pool_block *b;
va_list args;
int needed, avail;
struct pool_block *b;
va_list args;
int needed, avail;