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

ctypes::void still isn't correct #1907

Closed
brson opened this Issue Feb 26, 2012 · 0 comments

Comments

Projects
None yet
3 participants
@brson
Copy link
Contributor

brson commented Feb 26, 2012

This type is intended to only be used as an opaque type for unsafe pointers to point to. It is defined in a way that isn't constructable or destructurable, but it is still a copyable type. That means that you can define type complicated_c_struct = ctypes::void with the intent of using it only as an unsafe pointer, but could potentially write let newcopy = *complicated_c_struct_pointer and create a big mess.

We could put a resource field inside it to prevent this.

@ghost ghost assigned lht Mar 8, 2012

@graydon graydon closed this in ab4105d Apr 5, 2012

@brson brson unassigned lht Jun 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.