Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 166 for elem1 (0.12 sec)

  1. src/runtime/arena.go

    		x = s2
    	case abi.Slice:
    		len := (*slice)(e.data).len
    		et := (*slicetype)(unsafe.Pointer(t)).Elem
    		sl := new(slice)
    		*sl = slice{makeslicecopy(et, len, len, (*slice)(e.data).array), len, len}
    		xe := efaceOf(&x)
    		xe._type = t
    		xe.data = unsafe.Pointer(sl)
    	case abi.Pointer:
    		et := (*ptrtype)(unsafe.Pointer(t)).Elem
    		e2 := newobject(et)
    		typedmemmove(et, e2, e.data)
    		xe := efaceOf(&x)
    		xe._type = t
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  2. src/database/sql/convert.go

    	// For symmetry, also check for string destination types.
    	switch dv.Kind() {
    	case reflect.Pointer:
    		if src == nil {
    			dv.SetZero()
    			return nil
    		}
    		dv.Set(reflect.New(dv.Type().Elem()))
    		return convertAssignRows(dv.Interface(), src, rows)
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		if src == nil {
    			return fmt.Errorf("converting NULL to %s is unsupported", dv.Kind())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion_test.go

    			}
    			path = append(path, aField.Name)
    			assertEqualTypes(t, path, aField.Type, bField.Type)
    			path = path[:len(path)-1]
    		}
    
    	case reflect.Pointer, reflect.Slice:
    		aElemType := a.Elem()
    		bElemType := b.Elem()
    		assertEqualTypes(t, path, aElemType, bElemType)
    	case reflect.String:
    		// string types are equal
    
    	default:
    		fatalTypeError(t, path, a, b, "unhandled kind")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 29.2K bytes
    - Viewed (0)
  4. callbacks/query.go

    				switch db.Statement.ReflectValue.Kind() {
    				case reflect.Struct:
    					queryFields = db.Statement.ReflectValue.Type() != db.Statement.Schema.ModelType
    				case reflect.Slice:
    					queryFields = db.Statement.ReflectValue.Type().Elem() != db.Statement.Schema.ModelType
    				}
    			}
    
    			if queryFields {
    				stmt := gorm.Statement{DB: db}
    				// smaller struct
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 09:51:44 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/ImmutableSet.java

          case 1:
            @SuppressWarnings("unchecked") // safe; elements contains only E's
            // requireNonNull is safe because the first `n` elements are non-null.
            E elem = (E) requireNonNull(elements[0]);
            return of(elem);
          default:
            // continue below to handle the general case
        }
        int tableSize = chooseTableSize(n);
        Object[] table = new Object[tableSize];
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Sun Jun 02 13:36:19 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  6. src/text/template/funcs.go

    			if err != nil {
    				return reflect.Value{}, err
    			}
    			if x := item.MapIndex(index); x.IsValid() {
    				item = x
    			} else {
    				item = reflect.Zero(item.Type().Elem())
    			}
    		case reflect.Invalid:
    			// the loop holds invariant: item.IsValid()
    			panic("unreachable")
    		default:
    			return reflect.Value{}, fmt.Errorf("can't index item of type %s", item.Type())
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go

    		return nil, nil, nil
    	}
    
    	const numObjects = 10
    	store := cache.NewIndexer(storeElementKey, storeElementIndexers(nil))
    
    	for i := 0; i < numObjects; i++ {
    		elem := makeTestStoreElement(makeTestPod(fmt.Sprintf("pod-%d", i), uint64(i)))
    		store.Add(elem)
    	}
    
    	wci, err := newCacheIntervalFromStore(numObjects, store, getAttrsFunc, "", false)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/etcd3/store_test.go

    			// so we must ensure the value we created is available on the heap (not a problem
    			// for normal usage)
    			if !tt.args.v.CanAddr() {
    				x := reflect.New(tt.args.v.Type())
    				x.Elem().Set(tt.args.v)
    				tt.args.v = x.Elem()
    			}
    			growSlice(tt.args.v, tt.args.maxCapacity, tt.args.sizes...)
    			if tt.cap != tt.args.v.Cap() {
    				t.Errorf("Unexpected capacity: got=%d want=%d", tt.args.v.Cap(), tt.cap)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 11 12:45:33 UTC 2024
    - 26.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/list/list.go

    		do = func(x any) {
    			if !listJsonFields.needAll() {
    				//  Set x to a copy of itself with all non-requested fields cleared.
    				v := reflect.New(reflect.TypeOf(x).Elem()).Elem() // do is always called with a non-nil pointer.
    				v.Set(reflect.ValueOf(x).Elem())
    				for i := 0; i < v.NumField(); i++ {
    					if !listJsonFields.needAny(v.Type().Field(i).Name) {
    						v.Field(i).SetZero()
    					}
    				}
    				x = v.Interface()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 16 16:56:39 UTC 2024
    - 33.3K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    				}
    				return append(subpath, typ.String())
    			}
    		}
    		return nil
    	}
    
    	for {
    		atyp, ok := typ.Underlying().(*types.Array)
    		if !ok {
    			break
    		}
    		typ = atyp.Elem()
    	}
    
    	ttyp, ok := typ.Underlying().(*types.Tuple)
    	if ok {
    		for i := 0; i < ttyp.Len(); i++ {
    			subpath := lockPath(tpkg, ttyp.At(i).Type(), seen)
    			if subpath != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top