summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-07-31 09:43:20 +0200
committerHarald Welte <laforge@gnumonks.org>2019-07-31 10:16:07 +0200
commit513b2e34789b1125d44105aaadab8a3ae3493c5b (patch)
tree5c90b50b198eeb549e22ec4e92c62b726f772e46 /src
parentdbdd4f02739a0a7590a2a9cb3d0e3fafbdc6e76d (diff)
pseudotalloc: Simplistic wrapper of talloc_named()
The pseudotalloc layer doesn't yet support talloc_named() API which will be used by the upcoming "context" change. Let's add this function to pseudotalloc.c for our arm-non-eabi builds. Change-Id: I4d91ebd73a3357a17ef9143a1b41b90186d4c128
Diffstat (limited to 'src')
-rw-r--r--src/pseudotalloc/pseudotalloc.c5
-rw-r--r--src/pseudotalloc/talloc.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c
index c368296c..25425e57 100644
--- a/src/pseudotalloc/pseudotalloc.c
+++ b/src/pseudotalloc/pseudotalloc.c
@@ -46,6 +46,11 @@ void *talloc_named_const(const void *context, size_t size, const char *name)
return pseudotalloc_malloc(size);
}
+void *talloc_named(const void *context, size_t size, const char *fmt, ...)
+{
+ return pseudotalloc_malloc(size);
+}
+
void talloc_set_name_const(const void *ptr, const char *name)
{
}
diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h
index fe2efbcf..d257a981 100644
--- a/src/pseudotalloc/talloc.h
+++ b/src/pseudotalloc/talloc.h
@@ -48,6 +48,7 @@ int _talloc_free(void *ptr, const char *location);
#define talloc(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)
#define talloc_size(ctx, size) talloc_named_const(ctx, size, __location__)
void *talloc_named_const(const void *context, size_t size, const char *name);
+void *talloc_named(const void *context, size_t size, const char *fmt, ...);
void talloc_set_name_const(const void *ptr, const char *name);
char *talloc_strdup(const void *t, const char *p);
void *talloc_pool(const void *context, size_t size);