-
Notifications
You must be signed in to change notification settings - Fork 333
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
Specify Pointer#order and Struct#order #830
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was on my agenda, but you solved it better than I would have!
spec/ffi/struct_spec.rb
Outdated
|
||
before :each do | ||
@pointer = @struct.new | ||
@pointer.pointer.write_string("\x1\x2\x3\x4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be write_bytes
since write_string
might append a final \0 byte in future ffi releases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thank you Chris! |
This doesn't pass CI on TruffleRuby, due to not being implemented yet: oracle/truffleruby#2054 |
Also slight clarify documentation on
Pointer#order
, raise on an unknown order, and specifyPlatform::BYTE_ORDER
etc.Working towards oracle/truffleruby#2054.