Skip to content

Represent most nullable ptrs as Option<*T>s in the ffi #51

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

Merged
merged 1 commit into from
Nov 28, 2013

Conversation

brendanzab
Copy link
Member

No description provided.

brendanzab added a commit that referenced this pull request Nov 28, 2013
Represent most nullable ptrs as `Option<*T>`s in the ffi
@brendanzab brendanzab merged commit eb56cc4 into master Nov 28, 2013
@brendanzab brendanzab deleted the nullable-ptrs branch November 28, 2013 03:45
@ghost
Copy link

ghost commented Nov 28, 2013

This change is giving me some issues. I'm no longer able to create an opengl window with my own code or with your examples.

I'm guessing it is the fallout of rust-lang/rust#10571 and rust-lang/rust#10570.

With the current version of rust (90d06ec) reports the sizeof Option<*GLFWwindow> as 16. Not 8 if it was a nullable pointer.

@brendanzab
Copy link
Member Author

Weird. Sorry about that, I will revert it. I was hoping that using Options where the pointers were nullable would better convey the semantics, but it seems like we cannot rely on this behavior.

brendanzab added a commit that referenced this pull request Nov 29, 2013
This reverts commit eb56cc4, reversing
changes made to a440aad.
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.

1 participant