Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for FuncInt (0.17 sec)

  1. src/cmd/cgo/internal/testplugin/testdata/host/host.go

    // the command line do not have overlapping symbols. That is,
    // unnamed1.so/FuncInt and unnamed2.so/FuncInt should be distinct functions.
    func testUnnamed() {
    	p, err := plugin.Open("unnamed1.so")
    	if err != nil {
    		log.Fatalf(`plugin.Open("unnamed1.so"): %v`, err)
    	}
    	fn, err := p.Lookup("FuncInt")
    	if err != nil {
    		log.Fatalf(`unnamed1.so: Lookup("FuncInt") failed: %v`, err)
    	}
    	if got, want := fn.(func() int)(), 1; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testplugin/testdata/unnamed2/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    package main
    
    // // No C code required.
    import "C"
    
    func FuncInt() int { return 2 }
    
    func FuncRecursive() X { return X{} }
    
    type Y struct {
    	X *X
    }
    type X struct {
    	Y Y
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 366 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testplugin/testdata/unnamed1/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    package main
    
    // // No C code required.
    import "C"
    
    func FuncInt() int { return 1 }
    
    // Add a recursive type to check that type equality across plugins doesn't
    // crash. See https://golang.org/issues/19258
    func FuncRecursive() X { return X{} }
    
    type Y struct {
    	X *X
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 487 bytes
    - Viewed (0)
Back to top