-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler: respect C ABI for procs and top-level methods that involve extern structs #3311
Conversation
80d7f06
to
ae026a8
Compare
Hm, I think this doesn't work for procs that only return C structs, I'll fix it soon. |
ae026a8
to
b05936a
Compare
Done! I think this should cover a few cases that I missed before. |
@asterite, I have bad news. Most of my usages still break. I've updated the information about the dependency, and this snippet works correctly now, while the other one still gives the same wrong output. My other library seems to give bad results so far, I'll try to gather some details. |
b05936a
to
56bc69d
Compare
@BlaXpirit Got it! I was missing the case where the proc returned Can you try again now, also with other libs and code? If something doesn't work it should be very easy to make it work now (the core logic for this is already implemented) |
Yes, the original samples work now. But that just broke something in my other library (no idea where)
|
…extern structs. Fixes #605
56bc69d
to
f160b90
Compare
Fixes #605
@BlaXpirit Is there any chance you can test this change in some of your projects? The original snippet of #605 doesn't compile anymore, though I made a few tests that should cover that.
For now this works for procs and top-level methods (if you for example do
->foo(s : SomeStruct)
), but it doesn't work for class methods. I might fix that later.