- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 3,043 for gostringw (0.13 sec)
-
src/runtime/string_test.go
var b []uint16 for _, c := range s { b = append(b, uint16(c)) if c != rune(uint16(c)) { t.Errorf("bad test: stringW can't handle >16 bit runes") } } b = append(b, 0) r := runtime.GostringW(b) if r != s { t.Errorf("gostringW(%v) = %s, want %s", b, r, s) } } } func TestLargeStringConcat(t *testing.T) { output := runTestProg(t, "testprog", "stringconcat")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 13 14:05:23 UTC 2022 - 13.3K bytes - Viewed (0) -
src/runtime/string.go
// This is exported via linkname to assembly in syscall (for Plan9) and cgo. // //go:linkname gostring func gostring(p *byte) string { l := findnull(p) if l == 0 { return "" } s, b := rawstring(l) memmove(unsafe.Pointer(&b[0]), unsafe.Pointer(p), uintptr(l)) return s } // internal_syscall_gostring is a version of gostring for internal/syscall/unix. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:17:26 UTC 2024 - 13.4K bytes - Viewed (0) -
src/runtime/export_test.go
func MemclrBytes(b []byte) { s := (*slice)(unsafe.Pointer(&b)) memclrNoHeapPointers(s.array, uintptr(s.len)) } const HashLoad = hashLoad // entry point for testing func GostringW(w []uint16) (s string) { systemstack(func() { s = gostringw(&w[0]) }) return } var Open = open var Close = closefd var Read = read var Write = write func Envs() []string { return envs }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/runtime/os_windows.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 22:55:25 UTC 2024 - 41.5K bytes - Viewed (0) -
src/vendor/golang.org/x/net/dns/dnsmessage/message.go
} return printUint16(uint16(c)) } // GoString implements fmt.GoStringer.GoString. func (c Class) GoString() string { if n, ok := classNames[c]; ok { return "dnsmessage." + n } return printUint16(uint16(c)) } // An OpCode is a DNS operation code. type OpCode uint16 // GoString implements fmt.GoStringer.GoString. func (o OpCode) GoString() string { return printUint16(uint16(o)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 09 00:09:40 UTC 2024 - 69K bytes - Viewed (0) -
src/cmd/cgo/doc.go
C.sizeof_struct_stat. A C function may be declared in the Go file with a parameter type of the special name _GoString_. This function may be called with an ordinary Go string value. The string length, and a pointer to the string contents, may be accessed by calling the C functions size_t _GoStringLen(_GoString_ s); const char *_GoStringPtr(_GoString_ s); These functions are only available in the preamble, not in other C
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 17:12:16 UTC 2024 - 42.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testerrors/testdata/issue50710.go
// Copyright 2022 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 main // size_t StrLen(_GoString_ s) { // return _GoStringLen(s); // } import "C" func main() { C.StrLen1() // ERROR HERE
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 295 bytes - Viewed (0) -
src/os/user/cgo_lookup_syscall.go
func _C_gr_gid(g *_C_struct_group) _C_gid_t { return g.Gid } func _C_gr_name(g *_C_struct_group) *_C_char { return g.Name } func _C_GoString(p *_C_char) string { return unix.GoString(p) } func _C_getpwnam_r(name *_C_char, buf *_C_char, size _C_size_t) (pwd _C_struct_passwd, found bool, errno syscall.Errno) { var result *_C_struct_passwd errno = unix.Getpwnam(name, &pwd, buf, size, &result)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 11 04:31:34 UTC 2022 - 2.2K bytes - Viewed (0) -
test/fixedbugs/issue65808.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Mar 02 14:01:52 UTC 2024 - 562 bytes - Viewed (0) -
src/cmd/cgo/out.go
typedef struct { const char *p; intgo n; } _GoString_; typedef struct { char *p; intgo n; intgo c; } _GoBytes_; _GoString_ GoString(char *p); _GoString_ GoStringN(char *p, int l); _GoBytes_ GoBytes(void *p, int n); char *CString(_GoString_); void *CBytes(_GoBytes_); void *_CMalloc(size_t); __attribute__ ((unused)) static size_t _GoStringLen(_GoString_ s) { return (size_t)s.n; }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 29 16:41:10 UTC 2024 - 59.6K bytes - Viewed (0)