vendor: github.com/rjeczalik/notify update to master (#17527)

This commit is contained in:
Anton Evangelatov 2018-08-28 09:03:33 +02:00 committed by Péter Szilágyi
parent 1acefafe22
commit f236ac710e
4 changed files with 6 additions and 29 deletions

@ -48,7 +48,7 @@ var wg sync.WaitGroup // used to wait until the runloop starts
// started and is ready via the wg. It also serves purpose of a dummy source, // started and is ready via the wg. It also serves purpose of a dummy source,
// thanks to it the runloop does not return as it also has at least one source // thanks to it the runloop does not return as it also has at least one source
// registered. // registered.
var source = C.CFRunLoopSourceCreate(refZero, 0, &C.CFRunLoopSourceContext{ var source = C.CFRunLoopSourceCreate(C.kCFAllocatorDefault, 0, &C.CFRunLoopSourceContext{
perform: (C.CFRunLoopPerformCallBack)(C.gosource), perform: (C.CFRunLoopPerformCallBack)(C.gosource),
}) })
@ -166,8 +166,8 @@ func (s *stream) Start() error {
return nil return nil
} }
wg.Wait() wg.Wait()
p := C.CFStringCreateWithCStringNoCopy(refZero, C.CString(s.path), C.kCFStringEncodingUTF8, refZero) p := C.CFStringCreateWithCStringNoCopy(C.kCFAllocatorDefault, C.CString(s.path), C.kCFStringEncodingUTF8, C.kCFAllocatorDefault)
path := C.CFArrayCreate(refZero, (*unsafe.Pointer)(unsafe.Pointer(&p)), 1, nil) path := C.CFArrayCreate(C.kCFAllocatorDefault, (*unsafe.Pointer)(unsafe.Pointer(&p)), 1, nil)
ctx := C.FSEventStreamContext{} ctx := C.FSEventStreamContext{}
ref := C.EventStreamCreate(&ctx, C.uintptr_t(s.info), path, C.FSEventStreamEventId(atomic.LoadUint64(&since)), latency, flags) ref := C.EventStreamCreate(&ctx, C.uintptr_t(s.info), path, C.FSEventStreamEventId(atomic.LoadUint64(&since)), latency, flags)
if ref == nilstream { if ref == nilstream {

@ -1,14 +0,0 @@
// Copyright (c) 2018 The Notify Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// +build darwin,!kqueue,cgo,!go1.11
package notify
/*
#include <CoreServices/CoreServices.h>
*/
import "C"
var refZero = (*C.struct___CFAllocator)(nil)

@ -1,9 +0,0 @@
// Copyright (c) 2018 The Notify Authors. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
// +build darwin,!kqueue,go1.11
package notify
const refZero = 0

6
vendor/vendor.json vendored

@ -370,10 +370,10 @@
"revisionTime": "2017-08-14T17:01:13Z" "revisionTime": "2017-08-14T17:01:13Z"
}, },
{ {
"checksumSHA1": "D8AVDI39CJ+jvw0HOotYU2gz54c=", "checksumSHA1": "lU41NL1TEDtsrr0yUdp3SMB4Y9o=",
"path": "github.com/rjeczalik/notify", "path": "github.com/rjeczalik/notify",
"revision": "4e54e7fd043e865c50bda93359fb78813a8d165b", "revision": "0f065fa99b48b842c3fd3e2c8b194c6f2b69f6b8",
"revisionTime": "2018-08-08T20:39:25Z" "revisionTime": "2018-08-27T19:31:19Z"
}, },
{ {
"checksumSHA1": "5uqO4ITTDMklKi3uNaE/D9LQ5nM=", "checksumSHA1": "5uqO4ITTDMklKi3uNaE/D9LQ5nM=",