summaryrefslogtreecommitdiff
path: root/source/fitz/pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/pool.c')
-rw-r--r--source/fitz/pool.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/fitz/pool.c b/source/fitz/pool.c
index e676947f..2591c563 100644
--- a/source/fitz/pool.c
+++ b/source/fitz/pool.c
@@ -31,6 +31,14 @@ void *fz_pool_alloc(fz_context *ctx, fz_pool *pool, size_t size)
return ptr;
}
+char *fz_pool_strdup(fz_context *ctx, fz_pool *pool, const char *s)
+{
+ size_t n = strlen(s) + 1;
+ char *p = fz_pool_alloc(ctx, pool, n);
+ memcpy(p, s, n);
+ return p;
+}
+
void fz_drop_pool(fz_context *ctx, fz_pool *pool)
{
fz_pool_node *node = pool->head;