Search Options

Results per page
Sort
Preferred Languages
Advance

Results 61 - 70 of 504 for nelem (0.04 sec)

  1. schema/field.go

    					}
    
    					fieldValue.Elem().Set(reflectV.Convert(fieldType))
    					return
    				}
    			}
    
    			if reflectV.Kind() == reflect.Ptr {
    				if reflectV.IsNil() {
    					field.ReflectValueOf(ctx, value).Set(reflect.New(field.FieldType).Elem())
    				} else if reflectV.Type().Elem().AssignableTo(field.FieldType) {
    					field.ReflectValueOf(ctx, value).Set(reflectV.Elem())
    					return
    				} else {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  2. src/encoding/gob/type.go

    	return s
    }
    
    func (s *sliceType) init(elem gobType) {
    	// Set our type id before evaluating the element's, in case it's our own.
    	setTypeId(s)
    	// See the comments about ids in newTypeObject. Only slices and
    	// structs have mutual recursion.
    	if elem.id() == 0 {
    		setTypeId(elem)
    	}
    	s.Elem = elem.id()
    }
    
    func (s *sliceType) safeString(seen map[typeId]bool) string {
    	if seen[s.Id] {
    		return s.Name
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  3. src/runtime/chan.go

    	return makechan(t, int(size))
    }
    
    func makechan(t *chantype, size int) *hchan {
    	elem := t.Elem
    
    	// compiler checks this but be safe.
    	if elem.Size_ >= 1<<16 {
    		throw("makechan: invalid channel element type")
    	}
    	if hchanSize%maxAlign != 0 || elem.Align_ > maxAlign {
    		throw("makechan: bad alignment")
    	}
    
    	mem, overflow := math.MulUintptr(elem.Size_, uintptr(size))
    	if overflow || mem > maxAlloc-hchanSize || size < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/select.go

    			init = append(init, typecheck.Stmt(r))
    		}
    
    		c = typecheck.ConvNop(c, types.Types[types.TUNSAFEPTR])
    		setField("c", c)
    		if !ir.IsBlank(elem) {
    			elem = typecheck.ConvNop(elem, types.Types[types.TUNSAFEPTR])
    			setField("elem", elem)
    		}
    
    		// TODO(mdempsky): There should be a cleaner way to
    		// handle this.
    		if base.Flag.Race {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/subr.go

    	if src.IsPtr() && dst.IsPtr() && dst.Elem().NotInHeap() && !src.Elem().NotInHeap() {
    		why := fmt.Sprintf(":\n\t%v is incomplete (or unallocatable), but %v is not", dst.Elem(), src.Elem())
    		return ir.OXXX, why
    	}
    	// (b) Disallow string to []T where T is not-in-heap.
    	if src.IsString() && dst.IsSlice() && dst.Elem().NotInHeap() && (dst.Elem().Kind() == types.ByteType.Kind() || dst.Elem().Kind() == types.RuneType.Kind()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 19:45:58 UTC 2023
    - 20.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/api/apitesting/roundtrip/construct.go

    		// construct a zero-value item
    		item := reflect.New(t.Elem())
    		// recurse to populate the item, preserving the data context
    		fill(dataString, dataInt, t.Elem(), item.Elem(), fillFuncs, filledTypes)
    		// store in the map
    		v.Set(reflect.MakeMap(t))
    		v.SetMapIndex(key, item.Elem())
    
    	case reflect.Struct:
    		for i := 0; i < t.NumField(); i++ {
    			field := t.Field(i)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 27 19:12:59 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  7. src/internal/reflectlite/all_test.go

    func TestPtrSetNil(t *testing.T) {
    	var i int32 = 1234
    	ip := &i
    	vip := ValueOf(&ip)
    	vip.Elem().Set(Zero(vip.Elem().Type()))
    	if ip != nil {
    		t.Errorf("got non-nil (%d), want nil", *ip)
    	}
    }
    
    func TestMapSetNil(t *testing.T) {
    	m := make(map[string]int)
    	vm := ValueOf(&m)
    	vm.Elem().Set(Zero(vm.Elem().Type()))
    	if m != nil {
    		t.Errorf("got non-nil (%p), want nil", m)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 19:26:08 UTC 2023
    - 24.2K bytes
    - Viewed (0)
  8. platforms/software/testing-base/src/test/groovy/org/gradle/api/internal/tasks/testing/logging/StackTraceFilterTest.groovy

            spec.isSatisfiedBy(_) >> { StackTraceElement elem -> elem.methodName.size() > 10 }
    
            when:
            def filtered = filter.filter(trace)
    
            then:
            filtered.size() > 0
            filtered.size() < trace.size()
            filtered == trace.findAll { StackTraceElement elem -> elem.methodName.size() > 10 }
        }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Sep 18 20:52:40 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go

    				// map values are not addressable. We need a copy.
    				v := obj.MapIndex(k)
    				copy := reflect.New(v.Type())
    				copy.Elem().Set(v)
    				valueFuzz(copy.Elem())
    				obj.SetMapIndex(k, copy.Elem())
    			}
    			// TODO: set some new value
    		}
    	case reflect.Func: // ignore, we don't have function types in our API
    	default:
    		if !obj.CanSet() {
    			return
    		}
    		switch obj.Kind() {
    		case reflect.String:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/TopKSelector.java

          // uncheckedCastNullableTToT is safe because bufferSize > 0.
          if (comparator.compare(elem, uncheckedCastNullableTToT(threshold)) > 0) {
            threshold = elem;
          }
          // uncheckedCastNullableTToT is safe because bufferSize > 0.
        } else if (comparator.compare(elem, uncheckedCastNullableTToT(threshold)) < 0) {
          // Otherwise, we can ignore elem; we've seen k better elements.
          buffer[bufferSize++] = elem;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top