- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 118 for unsafe (0.31 sec)
-
src/cmd/cgo/internal/test/issue21897.go
xCFNumberRef = C.CFNumberCreate(C.kCFAllocatorSystemDefault, C.kCFNumberSInt64Type, unsafe.Pointer(&v)) //fmt.Printf("CFNumberRef: %x\n", uintptr(unsafe.Pointer(xCFNumberRef))) } var xCFNumberRef C.CFNumberRef func testCFDateRef() { xCFDateRef = C.CFDateCreate(C.kCFAllocatorSystemDefault, 0) // 0 value is 1 Jan 2001 00:00:00 GMT //fmt.Printf("CFDateRef: %x\n", uintptr(unsafe.Pointer(xCFDateRef))) } var xCFDateRef C.CFDateRef
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 1.4K bytes - Viewed (0) -
cmd/os_unix.go
func parseDirEnt(buf []byte) (consumed int, name []byte, typ os.FileMode, err error) { // golang.org/issue/15653 dirent := (*syscall.Dirent)(unsafe.Pointer(&buf[0])) if v := unsafe.Offsetof(dirent.Reclen) + unsafe.Sizeof(dirent.Reclen); uintptr(len(buf)) < v { return consumed, nil, typ, fmt.Errorf("buf size of %d smaller than dirent header size %d", len(buf), v) } if len(buf) < int(dirent.Reclen) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 9.3K bytes - Viewed (0) -
cmd/os-dirent_namelen_linux.go
package cmd import ( "bytes" "fmt" "syscall" "unsafe" ) func direntNamlen(dirent *syscall.Dirent) (uint64, error) { const fixedHdr = uint16(unsafe.Offsetof(syscall.Dirent{}.Name)) nameBuf := (*[unsafe.Sizeof(dirent.Name)]byte)(unsafe.Pointer(&dirent.Name[0])) const nameBufLen = uint16(len(nameBuf)) limit := dirent.Reclen - fixedHdr if limit > nameBufLen {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Aug 19 01:35:22 GMT 2021 - 1.5K bytes - Viewed (0) -
internal/lock/lock_windows.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package lock import ( "fmt" "os" "path/filepath" "syscall" "unsafe" "golang.org/x/sys/windows" ) var ( modkernel32 = windows.NewLazySystemDLL("kernel32.dll") procLockFileEx = modkernel32.NewProc("LockFileEx") ) const (
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Wed Oct 18 18:08:15 GMT 2023 - 7.9K bytes - Viewed (0) -
internal/disk/type_windows.go
// _In_ DWORD nFileSystemNameSize // ); _, _, _ = GetVolumeInformation.Call(uintptr(unsafe.Pointer(ps)), uintptr(unsafe.Pointer(&volumeName)), uintptr(volumeNameSize), uintptr(unsafe.Pointer(&lpVolumeSerialNumber)), uintptr(unsafe.Pointer(&lpMaximumComponentLength)), uintptr(unsafe.Pointer(&lpFileSystemFlags)), uintptr(unsafe.Pointer(&lpFileSystemNameBuffer)), uintptr(nFileSystemNameSize))
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 2.2K bytes - Viewed (0) -
internal/config/browser/browser.go
) // DefaultKVS - default storage class config var ( DefaultKVS = config.KVS{ config.KV{ Key: browserCSPPolicy, Value: "default-src 'self' 'unsafe-eval' 'unsafe-inline';", }, config.KV{ Key: browserHSTSSeconds, Value: "0", }, config.KV{ Key: browserHSTSIncludeSubdomains, Value: config.EnableOff, }, config.KV{
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 11 01:10:30 GMT 2024 - 5.8K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback_windows.go
} BackTrace[i] = (PVOID)(ControlPc); } return i; #else return 0; #endif } */ import "C" import ( "internal/testenv" "reflect" "runtime" "strings" "testing" "unsafe" ) // Test that the stack can be unwound through a call out and call back // into Go. func testCallbackCallersSEH(t *testing.T) { testenv.SkipIfOptimizationOff(t) // This test requires inlining.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Nov 29 16:01:37 GMT 2023 - 2.6K bytes - Viewed (0) -
src/cmd/cgo/internal/test/backdoor.go
// Copyright 2014 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. package cgotest import _ "unsafe" //go:linkname lockedOSThread runtime.lockedOSThread //extern runtime_lockedOSThread
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 307 bytes - Viewed (0) -
misc/cgo/gmp/gmp.go
} p := C.CString(s) defer C.free(unsafe.Pointer(p)) if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 { return os.ErrInvalid } return nil } // String returns the decimal representation of z. func (z *Int) String() string { if z == nil { return "nil" } z.doinit() p := C.mpz_get_str(nil, 10, &z.i[0]) s := C.GoString(p) C.free(unsafe.Pointer(p)) return s }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 9.5K bytes - Viewed (0) -
internal/disk/stat_windows.go
// _Out_ LPDWORD lpTotalNumberOfClusters // ); _, _, _ = GetDiskFreeSpace.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(path))), uintptr(unsafe.Pointer(&lpSectorsPerCluster)), uintptr(unsafe.Pointer(&lpBytesPerSector)), uintptr(unsafe.Pointer(&lpNumberOfFreeClusters)), uintptr(unsafe.Pointer(&lpTotalNumberOfClusters))) info.Files = uint64(lpTotalNumberOfClusters)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Mon Feb 26 19:34:50 GMT 2024 - 4.1K bytes - Viewed (0)