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
Incorrect function definitions #180
Comments
Thanks for the info. I'll check your links and this sounds like the issue that causes #172 |
This aligns perfectly with what my investigation into #172 was showing me! |
Update: The fix to the ffi gem (ffi/ffi#885) got in its master branch After ffi's release, how to fix the ethon side probably depends on whether you want to continue supporting ffi <= 1.14.2 or not. If you want to continue supporting old versions of ffi, the simplest is probably to just modify |
@vincentisambart thanks for the update. If possible please provide an MR with the fix. Supporting older ffi version isn't necessary. |
Created a PR: #183 |
The function definitions for
curl_easy_getinfo
,curl_easy_setopt
,curl_multi_setopt
inlib/ethon/curls/functions.rb
are incorrect.They are declared in curl as follows.
Meaning that they should be declared something like:
On some platforms,
curl_easy_getinfo
being declared as[:pointer, :info, :varargs], :easy_code
, or (as it is currently in ethon)[:pointer, :info, :pointer], :easy_code
, won't change how the method is called, but on some platforms (like on Apple Silicon / Apple M1), the ABI is different:https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code#3616882
Fixing it on the ethon side is not that hard (quick and dirty patch here), but unfortunately that is not enough: it seems the ffi gem currently doesn't support passing callbacks via varargs (ffi/ffi#732).
So the ffi gem has to be fixed first.
The text was updated successfully, but these errors were encountered: