aboutsummaryrefslogtreecommitdiff
path: root/main.c
blob: b01452e4f821a292dc1381e2de009218b832eedb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This is the test unit, not the actual code.

#define __MOONSHINE_LIBC_WARNINGS
#include "moonshine.h"

void cleanup_free(var* input) { print("Free that thang ", input); }

#define auto_free __attribute__((cleanup(cleanup_free)))

#define create(name, ...)                                                                                                      \
    auto_free var cat(name, _parent) = __VA_ARGS__;                                                                            \
    auto          name               = cat(name, _parent);

int main() {
    print("Wow ", strdup("Gay smex")[ 0 ]);

    return 0;
}