8000 use C.kCFAllocatorDefault instead of refZero by nonsense · Pull Request #162 · rjeczalik/notify · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

use C.kCFAllocatorDefault instead of refZero #162

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
Aug 27, 2018

Conversation

nonsense
Copy link
Contributor

This PR is removing refZero and using C.kCFAllocatorDefault instead, which according to golang/text@572a2b1 and https://developer.apple.com/documentation/corefoundation/kcfallocatordefault is defined as NULL.

Current version does not compile under go version go1.10.4 darwin/amd64 and throws:

vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:51: cannot use refZero (type *_Ctype_struct___CFAllocator) as type _Ctype_CFAllocatorRef in argument to func literal
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:169: cannot use refZero (type *_Ctype_struct___CFAllocator) as type _Ctype_CFAllocatorRef in argument to func literal
vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:170: cannot use refZero (type *_Ctype_struct___CFAllocator) as type _Ctype_CFAllocatorRef in argument to func literal

See: https://travis-ci.org/ethereum/go-ethereum/jobs/421003255#L164

@imsodin
Copy link
Contributor
imsodin commented Aug 27, 2018

Did you check if it works with Go1.11?

@nonsense
Copy link
Contributor Author

@imsodin yes, I checked, and this PR works with Go1.11 and Go1.10.4.

Actually current master (4e54e7f) works fine with Go1.11, however it doesn't work with Go1.10.4.

@rjeczalik rjeczalik merged commit 0f065fa into rjeczalik:master Aug 27, 2018
@rjeczalik
Copy link
Owner

Thanks @nonsense for the PR! I did know about C.kCFAllocatorDefault.

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.

3 participants
0