summaryrefslogtreecommitdiffstats
path: root/src/test.c
blob: 5358d2899f09779f26b396cad613e6a948a62a0d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "str.h"
#include "allocator.h"

#include <stdio.h>

const struct allocator *ga = &stdlib_strict_heap_allocator;

int
main(int argc, const char **argv)
{
	char *str;

	str = NULL;
	str = str_app(ga, NULL, str, "Something");
	str = str_app(ga, NULL, str, " -- and more!");

	printf("%s\n", str);

	ga->free(ga, str);
}