- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for isopen (0.09 sec)
-
src/cmd/cgo/internal/testplugin/testdata/iface/main.go
package main import ( "log" "plugin" "testplugin/iface_i" ) func main() { a, err := plugin.Open("iface_a.so") if err != nil { log.Fatalf(`plugin.Open("iface_a.so"): %v`, err) } b, err := plugin.Open("iface_b.so") if err != nil { log.Fatalf(`plugin.Open("iface_b.so"): %v`, err) } af, err := a.Lookup("F") if err != nil { log.Fatalf(`a.Lookup("F") failed: %v`, err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue19534/main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "plugin" func main() { p, err := plugin.Open("plugin.so") if err != nil { panic(err) } sym, err := p.Lookup("Foo") if err != nil { panic(err) } f := sym.(func() int) if f() != 42 { panic("expected f() == 42") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 411 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue24351/main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "plugin" func main() { p, err := plugin.Open("issue24351.so") if err != nil { panic(err) } f, err := p.Lookup("B") if err != nil { panic(err) } c := make(chan bool) f.(func(chan bool))(c) <-c
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 389 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/method/main.go
// license that can be found in the LICENSE file. // Issue 42579: methods of symbols exported from plugin must be live. package main import ( "plugin" "reflect" ) func main() { p, err := plugin.Open("plugin.so") if err != nil { panic(err) } x, err := p.Lookup("X") if err != nil { panic(err) } reflect.ValueOf(x).Elem().MethodByName("M").Call(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 478 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue18584/main.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import "plugin" func main() { p, err := plugin.Open("plugin.so") if err != nil { panic(err) } sym, err := p.Lookup("G") if err != nil { panic(err) } g := sym.(func() bool) if !g() { panic("expected types to match, Issue #18584") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 424 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue25756/main.go
flag.Parse() var a [MAXDIM * MAXDIM]int32 for i := 2; i < *dim; i += 8 { for j := 2; j < *dim-3; j += 8 { for y := 0; y < 3; y++ { a[i**dim+j+y] = 1 } } } p, err := plugin.Open("life.so") if err != nil { panic(err) } f, err := p.Lookup("Run") if err != nil { panic(err) } f.(func(int, int, int, []int32))(*gen, *dim, *dim, a[:]) for i := 0; i < *dim; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 928 bytes - Viewed (0) -
src/cmd/objdump/main.go
usage() } if *symregexp != "" { re, err := regexp.Compile(*symregexp) if err != nil { log.Fatalf("invalid -s regexp: %v", err) } symRE = re } f, err := objfile.Open(flag.Arg(0)) if err != nil { log.Fatal(err) } defer f.Close() dis, err := f.Disasm() if err != nil { log.Fatalf("disassemble %s: %v", flag.Arg(0), err) } switch flag.NArg() { default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 2.7K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/stdio/main.go
"os" ) func F() int { return int(C.F()) } func main() { if x := int(C.F()); x != 1 { fatal("x = %d, want 1", x) } // Open this file itself and verify that the first few characters are // as expected. f := Fopen("main.go", "r") if f.Swigcptr() == 0 { fatal("fopen failed") } if Fgetc(f) != '/' || Fgetc(f) != '/' || Fgetc(f) != ' ' || Fgetc(f) != 'C' { fatal("read unexpected characters") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:07 UTC 2023 - 975 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/checkdwarf/main.go
DWARF() (*dwarf.Data, error) } func openElf(path string) dwarfer { exe, err := elf.Open(path) if err != nil { return nil } return exe } func openMacho(path string) dwarfer { exe, err := macho.Open(path) if err != nil { return nil } return exe } func openPE(path string) dwarfer { exe, err := pe.Open(path) if err != nil { return nil } return exe } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.8K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue44956/main.go
// its own private base.stmp, which is not initialized, fail. package main import "plugin" func main() { _, err := plugin.Open("issue44956p1.so") if err != nil { panic("FAIL") } p2, err := plugin.Open("issue44956p2.so") if err != nil { panic("FAIL") } f, err := p2.Lookup("F") if err != nil { panic("FAIL") } x := f.(func() *map[int]int)()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.1K bytes - Viewed (0)