Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for CanAddr (0.11 sec)

  1. src/encoding/gob/enc_helpers.go

    	reflect.Uint64:     encUint64Slice,
    	reflect.Uintptr:    encUintptrSlice,
    }
    
    func encBoolArray(state *encoderState, v reflect.Value) bool {
    	// Can only slice if it is addressable.
    	if !v.CanAddr() {
    		return false
    	}
    	return encBoolSlice(state, v.Slice(0, v.Len()))
    }
    
    func encBoolSlice(state *encoderState, v reflect.Value) bool {
    	slice, ok := v.Interface().([]bool)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  2. src/encoding/gob/dec_helpers.go

    	reflect.Uint64:     decUint64Slice,
    	reflect.Uintptr:    decUintptrSlice,
    }
    
    func decBoolArray(state *decoderState, v reflect.Value, length int, ovfl error) bool {
    	// Can only slice if it is addressable.
    	if !v.CanAddr() {
    		return false
    	}
    	return decBoolSlice(state, v.Slice(0, v.Len()), length, ovfl)
    }
    
    func decBoolSlice(state *decoderState, v reflect.Value, length int, ovfl error) bool {
    	slice, ok := v.Interface().([]bool)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 19:28:46 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go

    	}
    
    	hard := func(k reflect.Kind) bool {
    		switch k {
    		case reflect.Array, reflect.Map, reflect.Slice, reflect.Struct:
    			return true
    		}
    		return false
    	}
    
    	if v1.CanAddr() && v2.CanAddr() && hard(v1.Kind()) {
    		addr1 := v1.UnsafeAddr()
    		addr2 := v2.UnsafeAddr()
    		if addr1 > addr2 {
    			// Canonicalize order to reduce number of entries in visited.
    			addr1, addr2 = addr2, addr1
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 20 17:18:42 UTC 2022
    - 10.8K bytes
    - Viewed (0)
  4. src/encoding/xml/read.go

    	}
    
    	if val.CanAddr() {
    		pv := val.Addr()
    		if pv.CanInterface() && pv.Type().Implements(unmarshalerType) {
    			return d.unmarshalInterface(pv.Interface().(Unmarshaler), start)
    		}
    	}
    
    	if val.CanInterface() && val.Type().Implements(textUnmarshalerType) {
    		return d.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler))
    	}
    
    	if val.CanAddr() {
    		pv := val.Addr()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 22.4K bytes
    - Viewed (0)
  5. src/encoding/xml/marshal.go

    	typ := val.Type()
    
    	// Check for marshaler.
    	if val.CanInterface() && typ.Implements(marshalerType) {
    		return p.marshalInterface(val.Interface().(Marshaler), defaultStart(typ, finfo, startTemplate))
    	}
    	if val.CanAddr() {
    		pv := val.Addr()
    		if pv.CanInterface() && pv.Type().Implements(marshalerType) {
    			return p.marshalInterface(pv.Interface().(Marshaler), defaultStart(pv.Type(), finfo, startTemplate))
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  6. association.go

    					if association.Relationship.Field.FieldType.Kind() == reflect.Struct {
    						assignBacks = append(assignBacks, assignBack{Source: source, Dest: rv.Index(0)})
    					}
    				}
    			case reflect.Struct:
    				if !rv.CanAddr() {
    					association.Error = ErrInvalidValue
    					return
    				}
    				association.Error = association.Relationship.Field.Set(association.DB.Statement.Context, source, rv.Addr().Interface())
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  7. statement.go

    			destValue := reflect.ValueOf(stmt.Dest)
    			for destValue.Kind() == reflect.Ptr {
    				destValue = destValue.Elem()
    			}
    
    			if stmt.ReflectValue != destValue {
    				if !destValue.CanAddr() {
    					destValueCanAddr := reflect.New(destValue.Type())
    					destValueCanAddr.Elem().Set(destValue)
    					stmt.Dest = destValueCanAddr.Interface()
    					destValue = destValueCanAddr.Elem()
    				}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Fri Jan 12 08:42:21 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  8. scan.go

    	for idx, field := range fields {
    		if field != nil {
    			values[idx] = field.NewValuePool.Get()
    		} else if len(fields) == 1 {
    			if reflectValue.CanAddr() {
    				values[idx] = reflectValue.Addr().Interface()
    			} else {
    				values[idx] = reflectValue.Interface()
    			}
    		}
    	}
    
    	db.RowsAffected++
    	db.AddError(rows.Scan(values...))
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/test/inl_test.go

    			"FullRuneInString",
    			"RuneLen",
    			"AppendRune",
    			"ValidRune",
    		},
    		"unicode/utf16": {
    			"Decode",
    		},
    		"reflect": {
    			"Value.Bool",
    			"Value.Bytes",
    			"Value.CanAddr",
    			"Value.CanComplex",
    			"Value.CanFloat",
    			"Value.CanInt",
    			"Value.CanInterface",
    			"Value.CanSet",
    			"Value.CanUint",
    			"Value.Cap",
    			"Value.Complex",
    			"Value.Float",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 04:07:57 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/meta/help.go

    	}
    	len := items.Len()
    	if len == 0 {
    		return nil
    	}
    	takeAddr := false
    	if elemType := items.Type().Elem(); elemType.Kind() != reflect.Pointer && elemType.Kind() != reflect.Interface {
    		if !items.Index(0).CanAddr() {
    			return fmt.Errorf("unable to take address of items in %T for EachListItem", obj)
    		}
    		takeAddr = true
    	}
    
    	for i := 0; i < len; i++ {
    		raw := items.Index(i)
    		if takeAddr {
    			if allocNew {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 29 16:25:43 UTC 2023
    - 9.8K bytes
    - Viewed (0)
Back to top