@@ -664,6 +664,30 @@ static void path_msg(struct merge_options *opt,
strbuf_addch(sb, '\n');
}
+MAYBE_UNUSED
+static void *pool_calloc(struct mem_pool *pool, size_t count, size_t size)
+{
+ if (!pool)
+ return xcalloc(count, size);
+ return mem_pool_calloc(pool, count, size);
+}
+
+MAYBE_UNUSED
+static void *pool_alloc(struct mem_pool *pool, size_t size)
+{
+ if (!pool)
+ return xmalloc(size);
+ return mem_pool_alloc(pool, size);
+}
+
+MAYBE_UNUSED
+static void *pool_strndup(struct mem_pool *pool, const char *str, size_t len)
+{
+ if (!pool)
+ return xstrndup(str, len);
+ return mem_pool_strndup(pool, str, len);
+}
+
/* add a string to a strbuf, but converting "/" to "_" */
static void add_flattened_path(struct strbuf *out, const char *s)
{