Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for calling (0.17 sec)

  1. src/cmd/cgo/doc.go

    In C, a function argument written as a fixed size array
    actually requires a pointer to the first element of the array.
    C compilers are aware of this calling convention and adjust
    the call accordingly, but Go cannot. In Go, you must pass
    the pointer to the first element explicitly: C.f(&C.x[0]).
    
    Calling variadic C functions is not supported. It is possible to
    circumvent this by using a C function wrapper. For example:
    
    	package main
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  2. src/cmd/cgo/ast.go

    	ctxFile
    	ctxDecl
    	ctxSpec
    	ctxDefer
    	ctxCall  // any function call other than ctxCall2
    	ctxCall2 // function call whose result is assigned to two variables
    	ctxSelector
    )
    
    // walk walks the AST x, calling visit(f, x, context) for each node.
    func (f *File) walk(x interface{}, context astContext, visit func(*File, interface{}, astContext)) {
    	visit(f, x, context)
    	switch n := x.(type) {
    	case *ast.Expr:
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jun 07 16:54:27 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  3. src/bytes/buffer_test.go

    		check(t, testname+" (fill 4)", buf, s)
    	}
    	return s
    }
    
    func TestNewBuffer(t *testing.T) {
    	buf := NewBuffer(testBytes)
    	check(t, "NewBuffer", buf, testString)
    }
    
    var buf Buffer
    
    // Calling NewBuffer and immediately shallow copying the Buffer struct
    // should not result in any allocations.
    // This can be used to reset the underlying []byte of an existing Buffer.
    func TestNewBufferShallow(t *testing.T) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  4. src/bufio/bufio.go

    func (b *Reader) Size() int { return len(b.buf) }
    
    // Reset discards any buffered data, resets all state, and switches
    // the buffered reader to read from r.
    // Calling Reset on the zero value of [Reader] initializes the internal buffer
    // to the default size.
    // Calling b.Reset(b) (that is, resetting a [Reader] to itself) does nothing.
    func (b *Reader) Reset(r io.Reader) {
    	// If a Reader r is passed to NewReader, NewReader will return r.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  5. src/archive/zip/writer.go

    	if w.cw.count != 0 {
    		panic("zip: SetOffset called after data was written")
    	}
    	w.cw.count = n
    }
    
    // Flush flushes any buffered data to the underlying writer.
    // Calling Flush is not normally necessary; calling Close is sufficient.
    func (w *Writer) Flush() error {
    	return w.cw.w.(*bufio.Writer).Flush()
    }
    
    // SetComment sets the end-of-central-directory comment field.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 04 14:28:57 GMT 2024
    - 19.3K bytes
    - Viewed (0)
  6. src/builtin/builtin.go

    // that point, the program is terminated with a non-zero exit code. This
    // termination sequence is called panicking and can be controlled by the
    // built-in function recover.
    //
    // Starting in Go 1.21, calling panic with a nil interface value or an
    // untyped nil causes a run-time error (a different panic).
    // The GODEBUG setting panicnil=1 disables the run-time error.
    func panic(v any)
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  7. src/archive/zip/reader.go

    type ReadCloser struct {
    	f *os.File
    	Reader
    }
    
    // A File is a single file in a ZIP archive.
    // The file information is in the embedded [FileHeader].
    // The file content can be accessed by calling [File.Open].
    type File struct {
    	FileHeader
    	zip          *Reader
    	zipr         io.ReaderAt
    	headerOffset int64 // includes overall ZIP archive baseOffset
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  8. src/archive/tar/writer.go

    }
    
    // Write writes to the current file in the tar archive.
    // Write returns the error [ErrWriteTooLong] if more than
    // Header.Size bytes are written after [Writer.WriteHeader].
    //
    // Calling Write on special types like [TypeLink], [TypeSymlink], [TypeChar],
    // [TypeBlock], [TypeDir], and [TypeFifo] returns (0, [ErrWriteTooLong]) regardless
    // of what the [Header.Size] claims.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  9. src/archive/tar/reader.go

    // until [Next] is called to advance to the next file.
    //
    // If the current file is sparse, then the regions marked as a hole
    // are read back as NUL-bytes.
    //
    // Calling Read on special types like [TypeLink], [TypeSymlink], [TypeChar],
    // [TypeBlock], [TypeDir], and [TypeFifo] returns (0, [io.EOF]) regardless of what
    // the [Header.Size] claims.
    func (tr *Reader) Read(b []byte) (int, error) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  10. src/bytes/bytes.go

    // upper case, giving priority to the special casing rules.
    func ToUpperSpecial(c unicode.SpecialCase, s []byte) []byte {
    	return Map(c.ToUpper, s)
    }
    
    // ToLowerSpecial treats s as UTF-8-encoded bytes and returns a copy with all the Unicode letters mapped to their
    // lower case, giving priority to the special casing rules.
    func ToLowerSpecial(c unicode.SpecialCase, s []byte) []byte {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
Back to top