Closed Dudejoe870 closed 2 months ago
Thanks for the info and sorry it didn't work, I'll take a look on my windows machine now!
Seems __attribute__((__packed__))
is not producing 1-byte enums on Windows? You can test this by replacing all instances of enum u8
with enum u32
in the bindings.
Oh...? Does that fix it? Perhaps on Windows you could do a when ODIN_OS == .Windows
to change the backing type
That fixed it! I'll make a PR now
Thanks for the great work here!
I was taking a look at a memory leak in the Odin bindings, you can find my changes here.
However, when trying to test my changes, it appears as if the example doesn't work at all on Windows? I tried the main branch of course as well; without my changes, and all I get is a white Window that stops responding, and just crashes. I haven't made a PR yet for the memory leak fix since I can't test it (though it's a very simple fix, you just forgot to
free_all(context.temp_allocator)
, also I cleaned up part of the code usingstrings.clone_to_cstring
instead of doing it manually). As I said, this behavior is the same on my branch as it is the main branch, so it isn't the fault of my changes of course.All I did to run it is use
odin run .
in theexamples/clay-official-website
directory.Doesn't look like it'd be a ton of help, but here's the log: