Skip to content
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

Add FFI::Enum#size #383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add FFI::Enum#size #383

wants to merge 1 commit into from

Conversation

mpalmer
Copy link

@mpalmer mpalmer commented Nov 2, 2014

This allows enums to be used directly in calls to FFI::MemoryPointer.new.
While you still can't get the enum back out, you're at least future-proofing
your code against the (admittedly small) possibility that the type of your
enums may change in the future (and FFI adds support for that, such as via

This allows enums to be used directly in calls to FFI::MemoryPointer.new.
While you still can't get the enum back out, you're at least future-proofing
your code against the (admittedly small) possibility that the type of your
enums may change in the future (and FFI adds support for that, such as via
@tduehr
Copy link
Member

tduehr commented Nov 3, 2014

Thanks for the PR. This makes the most sense coupled with #321. Which is waiting the same functionality to be added to JRuby before I merge it. I'll set up a PR for this in JRuby and take a look into getting the enum into the memory pointer as well when i get a change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants