Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for hack (0.18 sec)

  1. src/arena/arena.go

    */
    package arena
    
    import (
    	"internal/reflectlite"
    	"unsafe"
    )
    
    // Arena represents a collection of Go values allocated and freed together.
    // Arenas are useful for improving efficiency as they may be freed back to
    // the runtime manually, though any memory obtained from freed arenas must
    // not be accessed once that happens. An Arena is automatically freed once
    // it is no longer referenced, so it must be kept alive (see runtime.KeepAlive)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  2. src/cmd/cgo/doc.go

    	n, err = C.sqrt(-1)
    	_, err := C.voidFunc()
    	var n, err = C.sqrt(1)
    
    Calling C function pointers is currently not supported, however you can
    declare Go variables which hold C function pointers and pass them
    back and forth between Go and C. C code may call function pointers
    received from Go. For example:
    
    	package main
    
    	// typedef int (*intFunc) ();
    	//
    	// int
    	// bridge_int_func(intFunc f)
    	// {
    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)
  3. src/cmd/cgo/ast.go

    func (f *File) ParseGo(abspath string, src []byte) {
    	// Two different parses: once with comments, once without.
    	// The printer is not good enough at printing comments in the
    	// right place when we start editing the AST behind its back,
    	// so we use ast1 to look for the doc comments on import "C"
    	// and on exported functions, and we use ast2 for translating
    	// and reprinting.
    	// In cgo mode, we ignore ast2 and just apply edits directly
    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)
  4. src/bufio/bufio_test.go

    	// Normal execution.
    	for {
    		r1, _, err := r.ReadRune()
    		if err != nil {
    			if err != io.EOF {
    				t.Error("unexpected error on ReadRune:", err)
    			}
    			break
    		}
    		got += string(r1)
    		// Put it back and read it again.
    		if err = r.UnreadRune(); err != nil {
    			t.Fatal("unexpected error on UnreadRune:", err)
    		}
    		r2, _, err := r.ReadRune()
    		if err != nil {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Feb 10 18:56:01 GMT 2023
    - 51.5K bytes
    - Viewed (0)
  5. src/bytes/buffer_test.go

    	}
    	b = b[0:n]
    
    	// Check the resulting bytes
    	if !Equal(buf.Bytes(), b) {
    		t.Fatalf("incorrect result from WriteRune: %q not %q", buf.Bytes(), b)
    	}
    
    	p := make([]byte, utf8.UTFMax)
    	// Read it back with ReadRune
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(p, r)
    		nr, nbytes, err := buf.ReadRune()
    		if nr != r || nbytes != size || err != nil {
    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)
  6. src/cmd/cgo/internal/test/callback.go

    	"unsafe"
    )
    
    // Pass a func value from nestedCall to goCallback using an integer token.
    var callbackMutex sync.Mutex
    var callbackToken int
    var callbackFuncs = make(map[int]func())
    
    // nestedCall calls into C, back into Go, and finally to f.
    func nestedCall(f func()) {
    	// callback(x) calls goCallback(x)
    	callbackMutex.Lock()
    	callbackToken++
    	i := callbackToken
    	callbackFuncs[i] = f
    	callbackMutex.Unlock()
    
    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)
  7. doc/go1.17_spec.html

    raw string literals and interpreted string literals.
    </p>
    
    <p>
    Raw string literals are character sequences between back quotes, as in
    <code>`foo`</code>.  Within the quotes, any character may appear except
    back quote. The value of a raw string literal is the
    string composed of the uninterpreted (implicitly UTF-8-encoded) characters
    between the quotes;
    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)
  8. src/cmd/asm/internal/arch/arm.go

    func ARMConditionCodes(prog *obj.Prog, cond string) bool {
    	if cond == "" {
    		return true
    	}
    	bits, ok := ParseARMCondition(cond)
    	if !ok {
    		return false
    	}
    	/* hack to make B.NE etc. work: turn it into the corresponding conditional */
    	if prog.As == arm.AB {
    		prog.As = bcode[(bits^arm.C_SCOND_XOR)&0xf]
    		bits = (bits &^ 0xf) | arm.C_SCOND_NONE
    	}
    	prog.Scond = bits
    	return true
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  9. doc/next/6-stdlib/1-time.md

    When Go 1.23 builds older programs, the old behaviors remain in effect.
    The new [GODEBUG setting](/doc/godebug) [`asynctimerchan=1`](/pkg/time/#NewTimer)
    can be used to revert back to asynchronous channel behaviors
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  10. src/archive/zip/zip_test.go

    var errDiscardedBytes = errors.New("ReadAt of discarded bytes")
    
    func (ss *suffixSaver) ReadAt(p []byte, off int64) (n int, err error) {
    	back := ss.size - off
    	if back > int64(ss.keep) {
    		return 0, errDiscardedBytes
    	}
    	suf := ss.Suffix()
    	n = copy(p, suf[len(suf)-int(back):])
    	if n != len(p) {
    		err = io.EOF
    	}
    	return
    }
    
    func (ss *suffixSaver) Suffix() []byte {
    	if len(ss.buf) < ss.keep {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
Back to top