Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 183 for original (0.11 sec)

  1. src/runtime/checkptr.go

    	}
    
    	for _, original := range originals {
    		if base == checkptrBase(original) {
    			return
    		}
    	}
    
    	throw("checkptr: pointer arithmetic result points to invalid allocation")
    }
    
    // checkptrBase returns the base address for the allocation containing
    // the address p.
    //
    // Importantly, if p1 and p2 point into the same variable, then
    // checkptrBase(p1) == checkptrBase(p2). However, the converse/inverse
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/slices/iter.go

    	s := Collect(seq)
    	SortFunc(s, cmp)
    	return s
    }
    
    // SortedStableFunc collects values from seq into a new slice.
    // It then sorts the slice while keeping the original order of equal elements,
    // using the comparison function to compare elements.
    // It returns the new slice.
    func SortedStableFunc[E any](seq iter.Seq[E], cmp func(E, E) int) []E {
    	s := Collect(seq)
    	SortStableFunc(s, cmp)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:40:32 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. src/go/printer/printer_test.go

    		// ...
    		c*t.z
    }
    `
    
    	// parse original
    	f1, err := parser.ParseFile(fset, "src", src, parser.ParseComments)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// pretty-print original
    	var buf bytes.Buffer
    	err = (&Config{Mode: UseSpaces | SourcePos, Tabwidth: 8}).Fprint(&buf, fset, f1)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// parse pretty printed original
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  4. src/cmd/gofmt/gofmt.go

    		fmt.Fprintf(os.Stderr, "gofmt: %s: error restoring file to original: %v; backup in %s\n", filename, err, bakname)
    	}
    
    	n, err := fout.Write(formatted)
    	if err == nil && int64(n) < size {
    		err = fout.Truncate(int64(n))
    	}
    
    	if err != nil {
    		// Rewriting the file failed.
    
    		if n == 0 {
    			// Original file unchanged.
    			os.Remove(bakname)
    			return err
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  5. src/crypto/tls/handshake_messages_test.go

    				// their original representation, for later use in the handshake
    				// transcript. In order to prevent DeepEqual from failing since
    				// we didn't create the original message via unmarshalling, nil
    				// the field.
    				switch t := m.(type) {
    				case *clientHelloMsg:
    					t.original = nil
    				case *serverHelloMsg:
    					t.original = nil
    				}
    
    				if !reflect.DeepEqual(m1, m) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/object_test.go

    // the same Func Object as the original method. See also go.dev/issue/34421.
    func TestEmbeddedMethod(t *testing.T) {
    	const src = `package p; type I interface { error }`
    	pkg := mustTypecheck(src, nil, nil)
    
    	// get original error.Error method
    	eface := Universe.Lookup("error")
    	orig, _, _ := LookupFieldOrMethod(eface.Type(), false, nil, "Error")
    	if orig == nil {
    		t.Fatalf("original error.Error not found")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. src/slices/slices.go

    	return s
    }
    
    // DeleteFunc removes any elements from s for which del returns true,
    // returning the modified slice.
    // DeleteFunc zeroes the elements between the new length and the original length.
    func DeleteFunc[S ~[]E, E any](s S, del func(E) bool) S {
    	i := IndexFunc(s, del)
    	if i == -1 {
    		return s
    	}
    	// Don't start copying elements until we find one to delete.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 29 14:01:59 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. src/strconv/ftoa.go

    	}
    	lower := new(decimal)
    	lower.Assign(mantlo*2 + 1)
    	lower.Shift(explo - int(flt.mantbits) - 1)
    
    	// The upper and lower bounds are possible outputs only if
    	// the original mantissa is even, so that IEEE round-to-even
    	// would round to the original mantissa and not the neighbors.
    	inclusive := mant%2 == 0
    
    	// As we walk the digits we want to know whether rounding up would fall
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  9. src/net/splice_linux_test.go

    	handled bool
    	err     error
    
    	original func(dst, src *poll.FD, remain int64) (int64, bool, error)
    }
    
    func (h *spliceHook) install() {
    	h.original = pollSplice
    	pollSplice = func(dst, src *poll.FD, remain int64) (int64, bool, error) {
    		h.called = true
    		h.dstfd = dst.Sysfd
    		h.srcfd = src.Sysfd
    		h.remain = remain
    		h.written, h.handled, h.err = h.original(dst, src, remain)
    		return h.written, h.handled, h.err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  10. src/internal/weak/pointer.go

    	if ptr != nil {
    		u = runtime_registerWeakPointer(unsafe.Pointer(ptr))
    	}
    	runtime.KeepAlive(ptr)
    	return Pointer[T]{u}
    }
    
    // Strong creates a strong pointer from the weak pointer.
    // Returns nil if the original value for the weak pointer was reclaimed by
    // the garbage collector.
    // If a weak pointer points to an object with a finalizer, then Strong will
    // return nil as soon as the object's finalizer is queued for execution.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:13:25 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top