Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 1,318 for intPtr (0.19 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    func (intstr *IntOrString) UnmarshalCBOR(value []byte) error {
    	if err := cbor.Unmarshal(value, &intstr.StrVal); err == nil {
    		intstr.Type = String
    		return nil
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  2. src/runtime/mfinal_test.go

    func adjChunks() (*objtype, *objtype) {
    	var s []*objtype
    
    	for {
    		c := new(objtype)
    		for _, d := range s {
    			if uintptr(unsafe.Pointer(c))+unsafe.Sizeof(*c) == uintptr(unsafe.Pointer(d)) {
    				return c, d
    			}
    			if uintptr(unsafe.Pointer(d))+unsafe.Sizeof(*c) == uintptr(unsafe.Pointer(c)) {
    				return d, c
    			}
    		}
    		s = append(s, c)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 19 20:45:58 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  3. src/encoding/gob/codec_test.go

    		state := newDecodeStateFromData(unsignedResult)
    		execDec(instr, state, t, reflect.ValueOf(&data))
    		if data != 17 {
    			t.Errorf("uint32 a = %v not 17", data)
    		}
    	}
    
    	// uintptr
    	{
    		var data uintptr
    		instr := &decInstr{decOpTable[reflect.Uintptr], 6, nil, ovfl}
    		state := newDecodeStateFromData(unsignedResult)
    		execDec(instr, state, t, reflect.ValueOf(&data))
    		if data != 17 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 19 23:03:14 UTC 2023
    - 36.9K bytes
    - Viewed (0)
  4. src/os/dir_darwin.go

    		size = 100
    		n = -1
    	}
    
    	var dirent syscall.Dirent
    	var entptr *syscall.Dirent
    	for len(names)+len(dirents)+len(infos) < size || n == -1 {
    		if errno := readdir_r(d.dir, &dirent, &entptr); errno != 0 {
    			if errno == syscall.EINTR {
    				continue
    			}
    			return names, dirents, infos, &PathError{Op: "readdir", Path: f.name, Err: errno}
    		}
    		if entptr == nil { // EOF
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 20:52:06 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. src/encoding/json/decode_test.go

    	Int64   int64
    	Uint    uint
    	Uint8   uint8
    	Uint16  uint16
    	Uint32  uint32
    	Uint64  uint64
    	Uintptr uintptr
    	Float32 float32
    	Float64 float64
    
    	Foo  string `json:"bar"`
    	Foo2 string `json:"bar2,dummyopt"`
    
    	IntStr     int64   `json:",string"`
    	UintptrStr uintptr `json:",string"`
    
    	PBool    *bool
    	PInt     *int
    	PInt8    *int8
    	PInt16   *int16
    	PInt32   *int32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:40:14 UTC 2024
    - 67.6K bytes
    - Viewed (0)
  6. src/go/internal/gccgoimporter/importer_test.go

    	{pkgpath: "issue30628", name: "Apple", want: "type Apple struct{hey sync.RWMutex; x int; RQ [517]struct{Count uintptr; NumBytes uintptr; Last uintptr}}"},
    	{pkgpath: "issue31540", name: "S", gccgoVersion: 7, want: "type S struct{b int; map[Y]Z}"}, // should want "type S struct{b int; A2}" (issue  #44410)
    	{pkgpath: "issue34182", name: "T1", want: "type T1 struct{f *T2}"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  7. src/encoding/gob/decode.go

    			break
    		}
    		if state.fieldnum >= len(engine.instr)-delta { // subtract to compare without overflow
    			error_(errRange)
    		}
    		fieldnum := state.fieldnum + delta
    		instr := &engine.instr[fieldnum]
    		var field reflect.Value
    		if instr.index != nil {
    			// Otherwise the field is unknown to us and instr.op is an ignore op.
    			field = value.FieldByIndex(instr.index)
    			if field.Kind() == reflect.Pointer {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  8. pkg/controller/deployment/rolling_test.go

    	"testing"
    
    	apps "k8s.io/api/apps/v1"
    	"k8s.io/apimachinery/pkg/util/intstr"
    	"k8s.io/client-go/kubernetes/fake"
    	core "k8s.io/client-go/testing"
    	"k8s.io/client-go/tools/record"
    	"k8s.io/klog/v2/ktesting"
    )
    
    func TestDeploymentController_reconcileNewReplicaSet(t *testing.T) {
    	tests := []struct {
    		deploymentReplicas  int32
    		maxSurge            intstr.IntOrString
    		oldReplicas         int32
    		newReplicas         int32
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 08 09:10:50 UTC 2023
    - 11K bytes
    - Viewed (0)
  9. pkg/apis/policy/validation/validation_test.go

    	}
    }
    
    func TestValidateMinAvailablePodDisruptionBudgetSpec(t *testing.T) {
    	successCases := []intstr.IntOrString{
    		intstr.FromString("0%"),
    		intstr.FromString("1%"),
    		intstr.FromString("100%"),
    		intstr.FromInt32(0),
    		intstr.FromInt32(1),
    		intstr.FromInt32(100),
    	}
    	for _, c := range successCases {
    		spec := policy.PodDisruptionBudgetSpec{
    			MinAvailable: &c,
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 07 20:44:13 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  10. pkg/kube/apimirror/probe.go

    // UnmarshalJSON implements the json.Unmarshaller interface.
    func (intstr *IntOrString) UnmarshalJSON(value []byte) error {
    	if value[0] == '"' {
    		intstr.Type = String
    		return json.Unmarshal(value, &intstr.StrVal)
    	}
    	intstr.Type = Int
    	return json.Unmarshal(value, &intstr.IntVal)
    }
    
    // MarshalJSON implements the json.Marshaller interface.
    func (intstr IntOrString) MarshalJSON() ([]byte, error) {
    	switch intstr.Type {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top