Closed bnoordhuis closed 4 years ago
Hi,
you cannot use C types as structs, because that's unsafe (related to #22) i think the error message needs improvement here, it should have told you that it's an unknown C type.
it should compile inside an unsafe {} block, but it currently doesn't. as a workaround you can use a C block with
@{{
c code here
}}@
but that will be removed once unsafe works correctly
Thanks, I was indeed able to make it work through a C block. For future reference:
And more elegantly by copying it to a zz struct:
actually turns out unsafe block works just as expected.
i made the error message more useful
note that this has become alot more convenient with unsafe expressions
printf("%d\n", unsafe<int>(e->ino));
At commit ec50a85. Test case:
Fails to build with the following error message:
I'm wondering how to make that work. Grepping through zz's source tree, it might simply not be supported yet?