Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for byPref (0.1 sec)

  1. src/net/dnsclient.go

    	addrs[i:].shuffleByWeight()
    }
    
    // An MX represents a single DNS MX record.
    type MX struct {
    	Host string
    	Pref uint16
    }
    
    // byPref sorts MX records by preference
    type byPref []*MX
    
    // sort reorders MX records as specified in RFC 5321.
    func (s byPref) sort() {
    	for i := range s {
    		j := randIntn(i + 1)
    		s[i], s[j] = s[j], s[i]
    	}
    	slices.SortFunc(s, func(a, b *MX) int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:53 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. src/net/lookup_plan9.go

    	}
    	for _, line := range lines {
    		f := getFields(line)
    		if len(f) < 4 {
    			continue
    		}
    		if pref, _, ok := dtoi(f[2]); ok {
    			mx = append(mx, &MX{absDomainName(f[3]), uint16(pref)})
    		}
    	}
    	byPref(mx).sort()
    	return
    }
    
    func (r *Resolver) lookupNS(ctx context.Context, name string) (ns []*NS, err error) {
    	if systemConf().mustUseGoResolver(r) {
    		return r.goLookupNS(ctx, name)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:08:38 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/net/lookup_windows.go

    	for _, p := range validRecs(rec, syscall.DNS_TYPE_MX, name) {
    		v := (*syscall.DNSMXData)(unsafe.Pointer(&p.Data[0]))
    		mxs = append(mxs, &MX{absDomainName(windows.UTF16PtrToString(v.NameExchange)), v.Preference})
    	}
    	byPref(mxs).sort()
    	return mxs, nil
    }
    
    func (r *Resolver) lookupNS(ctx context.Context, name string) ([]*NS, error) {
    	if systemConf().mustUseGoResolver(r) {
    		return r.goLookupNS(ctx, name)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  4. src/net/lookup.go

    			return nil, &DNSError{
    				Err:    "cannot unmarshal DNS message",
    				Name:   name,
    				Server: server,
    			}
    		}
    		mxs = append(mxs, &MX{Host: mx.MX.String(), Pref: mx.Pref})
    
    	}
    	byPref(mxs).sort()
    	return mxs, nil
    }
    
    // goLookupNS returns the NS records for name.
    func (r *Resolver) goLookupNS(ctx context.Context, name string) ([]*NS, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 28.6K bytes
    - Viewed (0)
  5. platforms/documentation/docs/src/snippets/native-binaries/google-test/groovy/libs/googleTest/1.7.0/include/gtest/internal/gtest-tuple.h.pump

    namespace gtest_internal {
    
    // ByRef<T>::type is T if T is a reference; otherwise it's const T&.
    template <typename T>
    struct ByRef { typedef const T& type; };  // NOLINT
    template <typename T>
    struct ByRef<T&> { typedef T& type; };  // NOLINT
    
    // A handy wrapper for ByRef.
    #define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  6. testing/performance/src/templates/native-dependents-resources/googleTest/libs/googleTest/1.7.0/include/gtest/internal/gtest-tuple.h.pump

    namespace gtest_internal {
    
    // ByRef<T>::type is T if T is a reference; otherwise it's const T&.
    template <typename T>
    struct ByRef { typedef const T& type; };  // NOLINT
    template <typename T>
    struct ByRef<T&> { typedef T& type; };  // NOLINT
    
    // A handy wrapper for ByRef.
    #define GTEST_BY_REF_(T) typename ::std::tr1::gtest_internal::ByRef<T>::type
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Apr 04 07:21:38 UTC 2024
    - 9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/closure.go

    // This avoids allocation of a closure object.
    //
    // For illustration, the following call:
    //
    //	func(a int) {
    //		println(byval)
    //		byref++
    //	}(42)
    //
    // becomes:
    //
    //	func(byval int, &byref *int, a int) {
    //		println(byval)
    //		(*&byref)++
    //	}(byval, &byref, 42)
    func directClosureCall(n *ir.CallExpr) {
    	clo := n.Fun.(*ir.ClosureExpr)
    	clofn := clo.Func
    
    	if ir.IsTrivialClosure(clo) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  8. src/cmd/internal/goobj/objfile.go

    //       Size uint8
    //       Type uint16
    //       Add  int64
    //       Sym  symRef
    //    }
    //
    //    Aux [...]struct {
    //       Type uint8
    //       Sym  symRef
    //    }
    //
    //    Data   [...]byte
    //
    //    // blocks only used by tools (objdump, nm)
    //
    //    RefNames [...]struct { // referenced symbol names
    //       Sym  symRef
    //       Name string
    //       // TODO: include ABI version as well?
    //    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  9. src/cmd/internal/goobj/objfile_test.go

    	s.SetSiz(12345)
    	s.SetAlign(8)
    	s.Write(w)
    
    	var r Reloc
    	r.SetOff(12)
    	r.SetSiz(4)
    	r.SetType(uint16(objabi.R_ADDR))
    	r.SetAdd(54321)
    	r.SetSym(SymRef{11, 22})
    	r.Write(w)
    
    	var a Aux
    	a.SetType(AuxFuncInfo)
    	a.SetSym(SymRef{33, 44})
    	a.Write(w)
    
    	w.wr.Flush()
    
    	// Read them back and check.
    	b := buf.Bytes()
    	var s2 Sym
    	s2.fromBytes(b)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:22:12 UTC 2022
    - 3K bytes
    - Viewed (0)
  10. src/compress/flate/huffman_code.go

    type byFreq []literalNode
    
    func (s *byFreq) sort(a []literalNode) {
    	*s = byFreq(a)
    	sort.Sort(s)
    }
    
    func (s byFreq) Len() int { return len(s) }
    
    func (s byFreq) Less(i, j int) bool {
    	if s[i].freq == s[j].freq {
    		return s[i].literal < s[j].literal
    	}
    	return s[i].freq < s[j].freq
    }
    
    func (s byFreq) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 9.7K bytes
    - Viewed (0)
Back to top