#155·Cello

how am i supposed to work strings and vars with multiple functions?

Author: TunifyBasicCreated Dec 22, 2024Updated Dec 22, 2024
!!	
!!	Uncaught ValueError
!!	
!!		 Pointer '0x5f3681880004' passed to 'type_of' has bad magic number, perhaps it wasn't allocated by Cello.
!!	
c
#include <stdio.h>
#include <stdlib.h>

#include "inc/Cello.h"

struct fast_s {
        var string;
        var number;
};

void initFast(struct fast_s *fast) {
        fast->string = alloc(String);
        construct(fast->string, "hello, world!");
        show(fast->string);
        fast->number = new(Int, $I(4));
        return;
}

int main(int argc, char *argp[]) {
        struct fast_s *fast = malloc(sizeof(struct fast_s));
        initFast(fast);
        show(fast->string);
        show(fast->number);
        free(fast);
        return 0;
}```

i  tried $S $(String new(String but same always fail so how this should be done?