-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
No-arg Ptr constructor. #30919
No-arg Ptr constructor. #30919
Conversation
Isn't that what |
I wanted to call a C function that sets an array of pointers, ptrs_out = [Ptr{Cvoid}() for _ in 1:10]
ccall(..., (Ptr{Cvoid},), ptrs_out) Even if there's a different way of doing that, it still seems to sensible to default pointers to |
Looks like you'll need to rebase on master. |
@@ -8,6 +8,13 @@ memory is actually valid, or that it actually represents data of the specified t | |||
""" | |||
Ptr | |||
|
|||
""" |
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.
@fredrikekre should this have a compat annotation?
Seems like this is causing
during sysimg build time. |
Lets you write e.g.
Ptr{Cvoid}()
as a shorthand forPtr{Cvoid}(0)
. Nice for when you're creating a bunch of pointers you're going to pass as references to C libraries to set so you don't care about the initial value.