- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for expose (0.21 sec)
-
src/cmd/cgo/doc.go
that returns errno. # C references to Go Go functions can be exported for use by C code in the following way: //export MyFunction func MyFunction(arg1, arg2 int, arg3 string) int64 {...} //export MyFunction2 func MyFunction2(arg1, arg2 int, arg3 string) (int64, *C.char) {...} They will be available in the C code as:
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Sun Mar 31 09:02:45 GMT 2024 - 42.1K bytes - Viewed (0) -
src/cmd/api/api_test.go
} // TODO(gri) remove extra pkg directory eventually goldenFile := filepath.Join("testdata", "src", "pkg", fi.Name(), "golden.txt") w := NewWalker(nil, "testdata/src/pkg") pkg, _ := w.import_(fi.Name()) w.export(pkg) if *updateGolden { os.Remove(goldenFile) f, err := os.Create(goldenFile) if err != nil { t.Fatal(err) } for _, feat := range w.Features() { fmt.Fprintf(f, "%s\n", feat) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Jan 04 17:31:12 GMT 2024 - 7.1K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback_c_gc.c
// Copyright 2013 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. //go:build gc #include "_cgo_export.h" #include <stdint.h> #include <stdio.h> #include <stdlib.h> /* Test calling panic from C. This is what SWIG does. */ extern void crosscall2(void (*fn)(void *, int), void *, int); extern void _cgo_panic(void *, int);
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 592 bytes - Viewed (0) -
src/cmd/cgo/ast.go
if n.Doc == nil { return } for _, c := range n.Doc.List { if !strings.HasPrefix(c.Text, "//export ") { continue } name := strings.TrimSpace(c.Text[9:]) if name == "" { error_(c.Pos(), "export missing name") } if name != n.Name.Name { error_(c.Pos(), "export comment has wrong name %q, want %q", name, n.Name.Name) } doc := "" for _, c1 := range n.Doc.List {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jun 07 16:54:27 GMT 2023 - 14.3K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback.go
} } var stringFromGo string //export goWithString func goWithString(s string) { stringFromGo = s } func testCallbackStack(t *testing.T) { // Make cgo call and callback with different amount of stack available. // We do not do any explicit checks, just ensure that it does not crash. for _, f := range splitTests { f() } } //export goStackCheck func goStackCheck() {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 111.5K bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback_c_gccgo.c
// Copyright 2013 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. //go:build gccgo #include "_cgo_export.h" #include <stdint.h> #include <stdio.h> #include <stdlib.h> /* Test calling panic from C. This is what SWIG does. */ extern void _cgo_panic(const char *); extern void *_cgo_allocate(size_t); void callPanic(void) {
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 452 bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue20910.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <assert.h> #include <stdlib.h> #include <string.h> #include "_cgo_export.h" /* Test calling a Go function with multiple return values. */ void callMulti(void) { struct multi_return result = multi(); assert(strcmp(result.r0, "multi") == 0); assert(result.r1 == 0);
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri May 12 12:00:02 GMT 2023 - 459 bytes - Viewed (0) -
src/cmd/cgo/internal/test/cthread_windows.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <process.h> #include "_cgo_export.h" __stdcall static unsigned int addThread(void *p) { int i, max; max = *(int*)p; for(i=0; i<max; i++) Add(i); return 0; } void doAdd(int max, int nthread) {
C - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed May 17 21:53:11 GMT 2023 - 1.1K bytes - Viewed (0) -
api/go1.16.txt
pkg syscall (darwin-arm64), const RTM_RTTUNIT ideal-int pkg syscall (darwin-arm64), const RTM_VERSION = 5 pkg syscall (darwin-arm64), const RTM_VERSION ideal-int pkg syscall (darwin-arm64), const RTV_EXPIRE = 4 pkg syscall (darwin-arm64), const RTV_EXPIRE ideal-int pkg syscall (darwin-arm64), const RTV_HOPCOUNT = 2 pkg syscall (darwin-arm64), const RTV_HOPCOUNT ideal-int pkg syscall (darwin-arm64), const RTV_MTU = 1
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Dec 02 16:30:41 GMT 2022 - 479.2K bytes - Viewed (0) -
api/go1.14.txt
pkg syscall (freebsd-arm64), const RTM_RTTUNIT ideal-int pkg syscall (freebsd-arm64), const RTM_VERSION = 5 pkg syscall (freebsd-arm64), const RTM_VERSION ideal-int pkg syscall (freebsd-arm64), const RTV_EXPIRE = 4 pkg syscall (freebsd-arm64), const RTV_EXPIRE ideal-int pkg syscall (freebsd-arm64), const RTV_HOPCOUNT = 2 pkg syscall (freebsd-arm64), const RTV_HOPCOUNT ideal-int pkg syscall (freebsd-arm64), const RTV_MTU = 1
Plain Text - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Fri Feb 17 20:31:46 GMT 2023 - 508.9K bytes - Viewed (0)