diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 14:18:15 +0100 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2021-12-30 14:18:15 +0100 |
commit | ecc06c082036aa93f6810ec21e73610c55f5a57b (patch) | |
tree | aff479c3bc5b39ead9f65dffb01d399b341fa4ba /api/nil.c | |
download | uwu-lang-ecc06c082036aa93f6810ec21e73610c55f5a57b.tar.xz |
Initial commit
Diffstat (limited to 'api/nil.c')
-rw-r--r-- | api/nil.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/api/nil.c b/api/nil.c new file mode 100644 index 0000000..a9c54cc --- /dev/null +++ b/api/nil.c @@ -0,0 +1,37 @@ +#include <string.h> +#include "nil.h" + +UwUVMValue uwunil_create() +{ + return (UwUVMValue) { + .type = VT_NAT, + .value = { + .nat_value = { + .type = &uwunil_type, + .data = NULL, + } + } + }; +} + +static void *uwunil_copy(void *data) +{ + return data; +} + +static void uwunil_delete(void *data) +{ + (void) data; +} + +static char *uwunil_print(void *data) +{ + (void) data; + return strdup(""); +} + +UwUVMNativeType uwunil_type = { + .copy = &uwunil_copy, + .delete = &uwunil_delete, + .print = &uwunil_print, +}; |