it appears that the options hash needs to be passed to
FFI::CallbackInfo.new in order for the calling convention to be able to
be set to something besides :default.
it appears that the options hash needs to be passed to FFI::CallbackInfo.new in order for the calling convention to be able to be set to something besides :default.
Typo?
Yeah, looks that way. We really should be sharing the FFI Ruby bits
better so we can fix bugs like this in one place. I’m not sure how
that sharing is happening right now.
On Wed, 16 Dec 2009 11:11:51 -0600
Charles Oliver N. [email protected] wrote:
Charlie
I’d have filed a bug already except for one small thing.
I originally saw the failure on MRI 1.9.1 and 1.8.6 but not on JRuby
1.4.0 which has the old FFI::Library#callback but didn’t cause a
segfault. Weird as I’d expect something as fundamental as getting
calling convention wrong for a function would blow up everywhere.
While the JRuby’s current master version for callback seems wrong due to
not passing the options hash, I think the failure needs to be confirmed
with both 1.4.0 and latest master before saying it’s a bug for JRuby. I
wish I had more time to check into it. Sorry.
I’d have filed a bug already except for one small thing.
I originally saw the failure on MRI 1.9.1 and 1.8.6 but not on JRuby 1.4.0 which has the old FFI::Library#callback but didn’t cause a segfault. Weird as I’d expect something as fundamental as getting calling convention wrong for a function would blow up everywhere.
While the JRuby’s current master version for callback seems wrong due to not passing the options hash, I think the failure needs to be confirmed with both 1.4.0 and latest master before saying it’s a bug for JRuby. I wish I had more time to check into it. Sorry.
I’ll file a bug if needed if only just for tracking purposes so it
doesn’t get lost in a ML post. Let me know what you want.