- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for BYTE (0.08 sec)
-
misc/cgo/gmp/gmp.go
func (z *Int) doinit() { if z.init { return } z.init = true C.mpz_init(&z.i[0]) } // Bytes returns z's representation as a big-endian byte array. func (z *Int) Bytes() []byte { b := make([]byte, (z.Len()+7)/8) n := C.size_t(len(b)) C.mpz_export(unsafe.Pointer(&b[0]), &n, 1, 1, 1, 0, &z.i[0]) return b[0:n] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 9.5K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/libgo2/libgo2.go
go func() { runtime.LockOSThread() select {} }() } } // Block blocks the current thread while running Go code. // //export Block func Block() { select {} } var P *byte // TestSEGV makes sure that an invalid address turns into a run-time Go panic. // //export TestSEGV func TestSEGV() { defer func() { if recover() == nil { fmt.Fprintln(os.Stderr, "no panic from segv")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.6K bytes - Viewed (0) -
src/archive/zip/example_test.go
{"todo.txt", "Get animal handling licence.\nWrite more examples."}, } for _, file := range files { f, err := w.Create(file.Name) if err != nil { log.Fatal(err) } _, err = f.Write([]byte(file.Body)) if err != nil { log.Fatal(err) } } // Make sure to check the error on Close. err := w.Close() if err != nil { log.Fatal(err) } } func ExampleReader() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 27 00:22:03 UTC 2016 - 2K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue18146.go
attempts = max } } } if os.Getenv("test18146") == "exec" { runtime.GOMAXPROCS(1) for n := threads; n > 0; n-- { go func() { for { _ = md5.Sum([]byte("Hello, !")) } }() } runtime.GOMAXPROCS(threads) argv := append(os.Args, "-test.run=^$") if err := syscall.Exec(os.Args[0], argv, os.Environ()); err != nil { t.Fatal(err) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 05 23:35:32 UTC 2023 - 2.8K bytes - Viewed (0) -
src/cmd/cgo/internal/testgodefs/testdata/main.go
package main import ( "fmt" "os" "reflect" ) // Test that the struct field in anonunion.go was promoted. var v1 T var v2 = v1.L // Test that P, Q, and R all point to byte. var v3 = Issue8478{P: (*byte)(nil), Q: (**byte)(nil), R: (***byte)(nil)} // Test that N, A and B are fully defined var v4 = N{} var v5 = A{} var v6 = B{} // Test that S is fully defined var v7 = S{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.3K bytes - Viewed (0) -
misc/ios/detect.go
} func plistExtract(fname string, path string) ([]byte, error) { out, err := exec.Command("/usr/libexec/PlistBuddy", "-c", "Print "+path, fname).CombinedOutput() if err != nil { return nil, err } return bytes.TrimSpace(out), nil } func getLines(cmd *exec.Cmd) [][]byte { out := output(cmd) lines := bytes.Split(out, []byte("\n")) // Skip the empty line at the end.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:30 UTC 2023 - 3.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/issue42580.go
// {return 5;} // // int* get_arr(char* arg, void* dummy) // {return NULL;} import "C" import "unsafe" // Test variables var ( checkedPointer = []byte{1} doublePointerChecked = []byte{1} singleInnerPointerChecked = []byte{1} ) // This test checks the positions of variable identifiers. // Changing the positions of the test variables idents after this point will break the test.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.3K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue21897.go
testCFBooleanRef() // Allocate some memory, so eventually the write barrier is enabled // and it will see writes of bad pointers in the test* functions below. byteSliceSink = make([]byte, 1024) } } var byteSliceSink []byte func testCFNumberRef() { var v int64 = 0 xCFNumberRef = C.CFNumberCreate(C.kCFAllocatorSystemDefault, C.kCFNumberSInt64Type, unsafe.Pointer(&v))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 1.4K bytes - Viewed (0) -
src/archive/zip/register.go
fw, _ = flate.NewWriter(w, 5) } return &pooledFlateWriter{fw: fw} } type pooledFlateWriter struct { mu sync.Mutex // guards Close and Write fw *flate.Writer } func (w *pooledFlateWriter) Write(p []byte) (n int, err error) { w.mu.Lock() defer w.mu.Unlock() if w.fw == nil { return 0, errors.New("Write after Close") } return w.fw.Write(p) } func (w *pooledFlateWriter) Close() error { w.mu.Lock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
src/cmd/cgo/godefs.go
// For example, the socket data structures refer // to in_addr and in_addr6 structs but we want to be // able to treat them as byte arrays, so the godefs // inputs in package syscall say // // // +godefs map struct_in_addr [4]byte // // +godefs map struct_in_addr6 [16]byte // for _, g := range f.Comments { for _, c := range g.List { i := strings.Index(c.Text, "+godefs map") if i < 0 { continue
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 3.2K bytes - Viewed (0)