summaryrefslogtreecommitdiff
path: root/ccan/tal/talloc/_info
blob: 00241aa62fa0c0cf5db038f11817a23ca828cf7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "config.h"
#include <stdio.h>
#include <string.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("ccan/compiler\n");
		printf("ccan/likely\n");
		printf("ccan/str\n");
		printf("talloc\n");
		return 0;
	}

	if (strcmp(argv[1], "libs") == 0) {
		printf("talloc\n");
		return 0;
	}

	return 1;
}