|
|
|
|
|
by jcelerier
226 days ago
|
|
> When you want to embed a type, you need its definition, but you don’t actually need the full definition. You just need the size/alignment. Aren't there ABI cases where e.g. struct foo { float X, Y; }
would be passed in e.g. fp registers whereas struct { char[8]; }
would not? |
|
I sort of mentioned this in the blog but this is good clarification.
> if you want to pass a shared_ptr to Zig, you need to pass a pointer to the shared pointer
For lore, I believe this GitHub thread is where I first learned about the how types of the same size/alignment can still have different ABIs :) https://github.com/microsoft/win32metadata/issues/623#issuec...