]> git.ozlabs.org Git - ccan/blobdiff - ccan/tal/tal.c
tal: add typenames by default.
[ccan] / ccan / tal / tal.c
index d7b7b4b22e6ad34ad54e21f6b8bd2683d97c4337..612c67bb833f65de486a3c0d534487efc761d85e 100644 (file)
@@ -417,7 +417,7 @@ static void del_tree(struct tal_hdr *t)
         freefn(t);
 }
 
         freefn(t);
 }
 
-void *tal_alloc_(const tal_t *ctx, size_t size, bool clear)
+void *tal_alloc_(const tal_t *ctx, size_t size, bool clear, const char *label)
 {
         struct tal_hdr *child, *parent = debug_tal(to_tal_hdr_or_null(ctx));
 
 {
         struct tal_hdr *child, *parent = debug_tal(to_tal_hdr_or_null(ctx));
 
@@ -426,7 +426,7 @@ void *tal_alloc_(const tal_t *ctx, size_t size, bool clear)
                return NULL;
        if (clear)
                memset(from_tal_hdr(child), 0, size);
                return NULL;
        if (clear)
                memset(from_tal_hdr(child), 0, size);
-        child->prop = NULL;
+        child->prop = (void *)label;
         if (!add_child(parent, child)) {
                freefn(child);
                return NULL;
         if (!add_child(parent, child)) {
                freefn(child);
                return NULL;