Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ReadCommonX (0.19 sec)

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

    		called = true
    	}
    
    	readFunc, err = subp.Lookup("ReadCommonX")
    	if err != nil {
    		log.Fatalf(`sub/plugin1.Lookup("ReadCommonX") failed: %v`, err)
    	}
    	if got := readFunc.(func() int)(); got != wantX {
    		log.Fatalf("sub/plugin1.ReadCommonX()=%d, want %d", got, wantX)
    	}
    	if !called {
    		log.Fatal("calling ReadCommonX did not call FuncVar")
    	}
    
    	subf, err := subp.Lookup("F")
    	if err != nil {
    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/plugin1/plugin1.go

    // // No C code required.
    import "C"
    
    import (
    	"reflect"
    
    	"testplugin/common"
    )
    
    func F() int {
    	_ = make([]byte, 1<<21) // trigger stack unwind, Issue #18190.
    	return 3
    }
    
    func ReadCommonX() int {
    	return common.X
    }
    
    var Seven int
    
    func call(fn func()) {
    	fn()
    }
    
    func g() {
    	common.X *= Seven
    }
    
    func init() {
    	Seven = 7
    	call(g)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 820 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testplugin/testdata/sub/plugin1/plugin1.go

    // license that can be found in the LICENSE file.
    
    package main
    
    // // No C code required.
    import "C"
    
    import "testplugin/common"
    
    func F() int { return 17 }
    
    var FuncVar = func() {}
    
    func ReadCommonX() int {
    	FuncVar()
    	return common.X
    }
    
    func main() {
    	panic("plugin1.main called")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 395 bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testplugin/altpath/testdata/plugin-mismatch/main.go

    // The common package imported here does not match the common package
    // imported by plugin1. A program that attempts to load plugin1 and
    // plugin-mismatch should produce an error.
    import "testplugin/common"
    
    func ReadCommonX() int {
    	return common.X
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 466 bytes
    - Viewed (0)
Back to top