]> git.lizzy.rs Git - uwu-lang.git/blobdiff - api/nil.c
Add :ref module and refactor type handling
[uwu-lang.git] / api / nil.c
index a9c54cca55a96394372bc3a02e685b5c59eed87b..2c47cb60941990e71e1856d032f5558ad83b0bf0 100644 (file)
--- a/api/nil.c
+++ b/api/nil.c
@@ -4,22 +4,17 @@
 UwUVMValue uwunil_create()
 {
        return (UwUVMValue) {
-               .type = VT_NAT,
-               .value = {
-                       .nat_value = {
-                               .type = &uwunil_type,
-                               .data = NULL,   
-                       }
-               }       
+               .type = &uwunil_type,
+               .data = NULL,
        };
 }
 
-static void *uwunil_copy(void *data)
+static void *uwunil_clone(void *data)
 {
        return data;
 }
 
-static void uwunil_delete(void *data)
+static void uwunil_delet(void *data)
 {
        (void) data;
 }
@@ -30,8 +25,8 @@ static char *uwunil_print(void *data)
        return strdup("");
 }
 
-UwUVMNativeType uwunil_type = {
-       .copy = &uwunil_copy,
-       .delete = &uwunil_delete,
-       .print = &uwunil_print, 
+UwUVMType uwunil_type = {
+       .clone = &uwunil_clone,
+       .delet = &uwunil_delet,
+       .print = &uwunil_print,
 };