Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for gallery (0.28 sec)

  1. src/cmd/cgo/doc.go

    	// The C string is allocated in the C heap using malloc.
    	// It is the caller's responsibility to arrange for it to be
    	// freed, such as by calling C.free (be sure to include stdlib.h
    	// if C.free is needed).
    	func C.CString(string) *C.char
    
    	// Go []byte slice to C array
    	// The C array is allocated in the C heap using malloc.
    	// It is the caller's responsibility to arrange for it to be
    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. doc/go1.17_spec.html

    <li>
    <code>recover</code> was not called directly by a deferred function.
    </li>
    </ul>
    
    <p>
    The <code>protect</code> function in the example below invokes
    the function argument <code>g</code> and protects callers from
    run-time panics raised by <code>g</code>.
    </p>
    
    <pre>
    func protect(g func()) {
    	defer func() {
    		log.Println("done")  // Println executes normally even if there is a panic
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Apr 11 20:22:45 GMT 2024
    - 211.6K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/test/callback.go

    		"test.nestedCall.func1",
    		"test.nestedCall",
    		"test.testCallbackCallers",
    		"test.TestCallbackCallers",
    		"testing.tRunner",
    		"runtime.goexit",
    	}
    	nestedCall(func() {
    		n = runtime.Callers(4, pc)
    	})
    	if n != len(name) {
    		t.Errorf("expected %d frames, got %d", len(name), n)
    	}
    	for i := 0; i < n; i++ {
    		f := runtime.FuncForPC(pc[i] - 1) // TODO: use runtime.CallersFrames
    		if f == nil {
    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)
  4. src/builtin/builtin.go

    // goroutine. When a function F calls panic, normal execution of F stops
    // immediately. Any functions whose execution was deferred by F are run in
    // the usual way, and then F returns to its caller. To the caller G, the
    // invocation of F then behaves like a call to panic, terminating G's
    // execution and running any deferred functions. This continues until all
    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)
  5. doc/go_spec.html

    causes a <a href="#Run_time_panics">run-time panic</a>.
    </p>
    
    <p>
    The <code>protect</code> function in the example below invokes
    the function argument <code>g</code> and protects callers from
    run-time panics raised by <code>g</code>.
    </p>
    
    <pre>
    func protect(g func()) {
    	defer func() {
    		log.Println("done")  // Println executes normally even if there is a panic
    HTML
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 00:39:16 GMT 2024
    - 279.6K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/swig/testdata/callback/main.h

    // license that can be found in the LICENSE file.
    
    class Callback {
    public:
    	virtual ~Callback() { }
    	virtual std::string run() { return "Callback::run"; }
    };
    
    class Caller {
    private:
    	Callback *callback_;
    public:
    	Caller(): callback_(0) { }
    	~Caller() { delCallback(); }
    	void delCallback() { delete callback_; callback_ = 0; }
    	void setCallback(Callback *cb) { delCallback(); callback_ = cb; }
    	std::string call();
    C
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 529 bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/swig/testdata/callback/main.cc

    // license that can be found in the LICENSE file.
    
    // This .cc file will be automatically compiled by the go tool and
    // included in the package.
    
    #include <string>
    #include "main.h"
    
    std::string Caller::call() {
    	if (callback_ != 0)
    		return callback_->run();
    	return "";
    C++
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri May 12 12:00:07 GMT 2023
    - 384 bytes
    - Viewed (0)
  8. src/archive/zip/struct.go

    // the file it describes, it may be necessary to modify the Name field
    // of the returned header to provide the full path name of the file.
    // If compression is desired, callers should set the FileHeader.Method
    // field; it is unset by default.
    func FileInfoHeader(fi fs.FileInfo) (*FileHeader, error) {
    	size := fi.Size()
    	fh := &FileHeader{
    		Name:               fi.Name(),
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  9. src/bytes/buffer.go

    	slice, err := b.readSlice(delim)
    	return string(slice), err
    }
    
    // NewBuffer creates and initializes a new [Buffer] using buf as its
    // initial contents. The new [Buffer] takes ownership of buf, and the
    // caller should not use buf after this call. NewBuffer is intended to
    // prepare a [Buffer] to read existing data. It can also be used to set
    // the initial size of the internal buffer for writing. To do that,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  10. src/archive/tar/common.go

    		}
    	}
    	if sysStat != nil {
    		return h, sysStat(fi, h, doNameLookups)
    	}
    	return h, nil
    }
    
    // FileInfoNames extends [fs.FileInfo].
    // Passing an instance of this to [FileInfoHeader] permits the caller
    // to avoid a system-dependent name lookup by specifying the Uname and Gname directly.
    type FileInfoNames interface {
    	fs.FileInfo
    	// Uname should give a user name.
    	Uname() (string, error)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
Back to top