Copyright 2020 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+build darwin,!ios
Package macOS provides cgo-less wrappers for Core Foundation and Security.framework, similarly to how package syscall provides access to libSystem.dylib.
package macOS

import (
	
	
	
	
)
Core Foundation linker flags for the external linker. See Issue 42459.go:cgo_ldflag "-framework"go:cgo_ldflag "CoreFoundation"
CFRef is an opaque reference to a Core Foundation object. It is a pointer, but to memory not owned by Go, so not an unsafe.Pointer.
CFDataToSlice returns a copy of the contents of data as a bytes slice.
func ( CFRef) []byte {
	 := CFDataGetLength()
	 := CFDataGetBytePtr()
	 := (*[1 << 20]byte)(unsafe.Pointer())[::]
	 := make([]byte, )
	copy(, )
	return 
}

type CFString CFRef

const kCFAllocatorDefault = 0
const kCFStringEncodingUTF8 = 0x08000100
go:linkname x509_CFStringCreateWithBytes x509_CFStringCreateWithBytesgo:cgo_import_dynamic x509_CFStringCreateWithBytes CFStringCreateWithBytes "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
StringToCFString returns a copy of the UTF-8 contents of s as a new CFString.
go:linkname x509_CFDictionaryGetValueIfPresent x509_CFDictionaryGetValueIfPresentgo:cgo_import_dynamic x509_CFDictionaryGetValueIfPresent CFDictionaryGetValueIfPresent "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"

func ( CFRef,  CFString) ( CFRef,  bool) {
	 := syscall(funcPC(x509_CFDictionaryGetValueIfPresent_trampoline), uintptr(), uintptr(),
		uintptr(unsafe.Pointer(&)), 0, 0, 0)
	if  == 0 {
		return 0, false
	}
	return , true
}
func ()

const kCFNumberSInt32Type = 3
go:linkname x509_CFNumberGetValue x509_CFNumberGetValuego:cgo_import_dynamic x509_CFNumberGetValue CFNumberGetValue "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"

func ( CFRef) (int32, error) {
	var  int32
	 := syscall(funcPC(x509_CFNumberGetValue_trampoline), uintptr(), uintptr(kCFNumberSInt32Type),
		uintptr(unsafe.Pointer(&)), 0, 0, 0)
	if  == 0 {
		return 0, errors.New("CFNumberGetValue call failed")
	}
	return , nil
}
func ()
go:linkname x509_CFDataGetLength x509_CFDataGetLengthgo:cgo_import_dynamic x509_CFDataGetLength CFDataGetLength "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"

func ( CFRef) int {
	 := syscall(funcPC(x509_CFDataGetLength_trampoline), uintptr(), 0, 0, 0, 0, 0)
	return int()
}
func ()
go:linkname x509_CFDataGetBytePtr x509_CFDataGetBytePtrgo:cgo_import_dynamic x509_CFDataGetBytePtr CFDataGetBytePtr "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
go:linkname x509_CFArrayGetCount x509_CFArrayGetCountgo:cgo_import_dynamic x509_CFArrayGetCount CFArrayGetCount "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"

func ( CFRef) int {
	 := syscall(funcPC(x509_CFArrayGetCount_trampoline), uintptr(), 0, 0, 0, 0, 0)
	return int()
}
func ()
go:linkname x509_CFArrayGetValueAtIndex x509_CFArrayGetValueAtIndexgo:cgo_import_dynamic x509_CFArrayGetValueAtIndex CFArrayGetValueAtIndex "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
go:linkname x509_CFEqual x509_CFEqualgo:cgo_import_dynamic x509_CFEqual CFEqual "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"

func (,  CFRef) bool {
	 := syscall(funcPC(x509_CFEqual_trampoline), uintptr(), uintptr(), 0, 0, 0, 0)
	return  == 1
}
func ()
go:linkname x509_CFRelease x509_CFReleasego:cgo_import_dynamic x509_CFRelease CFRelease "/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation"
syscall is implemented in the runtime package (runtime/sys_darwin.go)
func (, , , , , ,  uintptr) uintptr
funcPC returns the entry point for f. See comments in runtime/proc.go for the function of the same name.go:nosplit
func ( func()) uintptr {
	return **(**uintptr)(unsafe.Pointer(&))