Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Swigcptr (0.21 sec)

  1. src/cmd/cgo/internal/swig/testdata/stdio/main.go

    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")
    	}
    	if Fclose(f) != 0 {
    		fatal("fclose failed")
    	}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 975 bytes
    - Viewed (0)
Back to top