Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 57 for IsPtr (0.16 sec)

  1. operator/pkg/validate/validate.go

    	if structPtr == nil {
    		return nil
    	}
    	if util.IsStruct(structPtr) {
    		scope.Debugf("validate path %s, skipping struct type %T", path, structPtr)
    		return nil
    	}
    	if !util.IsPtr(structPtr) {
    		metrics.CRValidationErrorTotal.Increment()
    		return util.NewErrs(fmt.Errorf("validate path %s, value: %v, expected ptr, got %T", path, structPtr, structPtr))
    	}
    	structElems := reflect.ValueOf(structPtr).Elem()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 12 16:04:15 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  2. src/go/types/struct.go

    			// (via under(t)) a possibly incomplete type.
    
    			// for use in the closure below
    			embeddedTyp := typ
    			embeddedPos := f.Type
    
    			check.later(func() {
    				t, isPtr := deref(embeddedTyp)
    				switch u := under(t).(type) {
    				case *Basic:
    					if !isValid(t) {
    						// error was reported before
    						return
    					}
    					// unsafe.Pointer is treated like a regular pointer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/struct.go

    			// (via under(t)) a possibly incomplete type.
    			embeddedTyp := typ // for closure below
    			embeddedPos := pos
    			check.later(func() {
    				t, isPtr := deref(embeddedTyp)
    				switch u := under(t).(type) {
    				case *Basic:
    					if !isValid(t) {
    						// error was reported before
    						return
    					}
    					// unsafe.Pointer is treated like a regular pointer
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. operator/pkg/util/reflect.go

    	}
    	return reflect.TypeOf(value).Kind()
    }
    
    // IsString reports whether value is a string type.
    func IsString(value any) bool {
    	return kindOf(value) == reflect.String
    }
    
    // IsPtr reports whether value is a ptr type.
    func IsPtr(value any) bool {
    	return kindOf(value) == reflect.Ptr
    }
    
    // IsMap reports whether value is a map type.
    func IsMap(value any) bool {
    	return kindOf(value) == reflect.Map
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/expr.go

    // index'th field of the given expression, which must be of struct or
    // pointer-to-struct type.
    func DotField(pos src.XPos, x ir.Node, index int) *ir.SelectorExpr {
    	op, typ := ir.ODOT, x.Type()
    	if typ.IsPtr() {
    		op, typ = ir.ODOTPTR, typ.Elem()
    	}
    	if !typ.IsStruct() {
    		base.FatalfAt(pos, "DotField of non-struct: %L", x)
    	}
    
    	// TODO(mdempsky): This is the backend's responsibility.
    	types.CalcSize(typ)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/cel/value.go

    	}
    
    	// Unwrap pointers, but track their use.
    	isPtr := false
    	if typeDesc.Kind() == reflect.Pointer {
    		tk := typeDesc
    		typeDesc = typeDesc.Elem()
    		if typeDesc.Kind() == reflect.Pointer {
    			return nil, fmt.Errorf("unsupported type conversion to '%v'", tk)
    		}
    		isPtr = true
    	}
    
    	if typeDesc.Kind() == reflect.Map {
    		keyType := typeDesc.Key()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 10 22:05:55 UTC 2022
    - 20.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/_gen/S390X.rules

    	(MOVDload  [off1+off2] {mergeSym(sym1,sym2)} base mem)
    (MOVWZload  [off1] {sym1} (MOVDaddr <t> [off2] {sym2} base) mem) && is32Bit(int64(off1)+int64(off2)) && canMergeSym(sym1, sym2) && (base.Op != OpSB || (t.IsPtr() && t.Elem().Alignment()%4 == 0 && (off1+off2)%4 == 0)) =>
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 18:09:26 UTC 2023
    - 74.3K bytes
    - Viewed (0)
  8. src/reflect/abi.go

    	// pointer bitmap for arguments.
    	inRegPtrs := abi.IntArgRegBitmap{}
    
    	// Compute abiSeq for input parameters.
    	var in abiSeq
    	if rcvr != nil {
    		stkStep, isPtr := in.addRcvr(rcvr)
    		if stkStep != nil {
    			if isPtr {
    				stackPtrs.append(1)
    			} else {
    				stackPtrs.append(0)
    			}
    		} else {
    			spill += goarch.PtrSize
    		}
    	}
    	for i, arg := range t.InSlice() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:08:32 UTC 2024
    - 15K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types/type.go

    }
    
    func (t *Type) IsComplex() bool {
    	return t.kind == TCOMPLEX64 || t.kind == TCOMPLEX128 || t == UntypedComplex
    }
    
    // IsPtr reports whether t is a regular Go pointer type.
    // This does not include unsafe.Pointer.
    func (t *Type) IsPtr() bool {
    	return t.kind == TPTR
    }
    
    // IsPtrElem reports whether t is the element of a pointer (to t).
    func (t *Type) IsPtrElem() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/range.go

    			body = []ir.Node{rangeAssign2(nrange, hv1, tmp)}
    			break
    		}
    
    		// Slice to iterate over
    		var hs ir.Node
    		if t.IsSlice() {
    			hs = ha
    		} else {
    			var arr ir.Node
    			if t.IsPtr() {
    				arr = ha
    			} else {
    				arr = typecheck.NodAddr(ha)
    				arr.SetType(t.PtrTo())
    				arr.SetTypecheck(1)
    			}
    			hs = ir.NewSliceExpr(base.Pos, ir.OSLICEARR, arr, nil, nil, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
Back to top