X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftal%2Ftalloc%2F_info;fp=ccan%2Ftal%2Ftalloc%2F_info;h=cf01d6cc88a16088fcba229c44f3bbcd44a743d7;hp=0000000000000000000000000000000000000000;hb=3c164cd21a13bd3904117f6a33e06945f0f1850c;hpb=d3cbb4cbbc38c96c3a20a7e4e602be7327f25202 diff --git a/ccan/tal/talloc/_info b/ccan/tal/talloc/_info new file mode 100644 index 00000000..cf01d6cc --- /dev/null +++ b/ccan/tal/talloc/_info @@ -0,0 +1,40 @@ +#include +#include +#include "config.h" + +/** + * tal/talloc - an implementation of the tal interface in terms of talloc. + * + * Tal and talloc are both hierarchical allocators, but have different APIs. + * The tal API is mostly a subset of talloc, but if your project already + * uses talloc then having both tal and talloc pointers is confusing, and + * a waste of resources. + * + * The standard convention to tell ccan modules to use this instead of + * ccan/tal is to define TAL_USE_TALLOC, usually on the commandline. + * + * Bugs: + * tal_first() and tal_next() can't be implemented. + * tal_set_backend() can only change the error function. + * + * License: LGPL + */ +int main(int argc, char *argv[]) +{ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + printf("ccan/take\n"); + printf("ccan/typesafe_cb\n"); + printf("talloc\n"); + return 0; + } + + if (strcmp(argv[1], "libs") == 0) { + printf("talloc\n"); + return 0; + } + + return 1; +}