Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for goFoo (0.15 sec)

  1. src/cmd/cgo/internal/test/callback_c.c

    void
    callback(void *f)
    {
    	// use some stack space
    	volatile char data[64*1024];
    
    	data[0] = 0;
    	goCallback(f);
            data[sizeof(data)-1] = 0;
    }
    
    void
    callGoFoo(void)
    {
    	extern void goFoo(void);
    	goFoo();
    }
    
    void
    IntoC(void)
    {
    	BackIntoGo();
    }
    
    void
    Issue1560InC(void)
    {
    	Issue1560FromC();
    }
    
    void
    callGoStackCheck(void)
    {
    	extern void goStackCheck(void);
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:02 GMT 2023
    - 933 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/callback.go

    func testZeroArgCallback(t *testing.T) {
    	defer func() {
    		s := recover()
    		if s != nil {
    			t.Fatal("panic during callback:", s)
    		}
    	}()
    	C.callGoFoo()
    }
    
    //export goFoo
    func goFoo() {
    	x := 1
    	for i := 0; i < 10000; i++ {
    		// variadic call mallocs + writes to
    		variadic(x, x, x)
    		if x != 1 {
    			panic("bad x")
    		}
    	}
    }
    
    func variadic(x ...interface{}) {}
    
    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)
Back to top