Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 196 for IntPtr (0.11 sec)

  1. test/interface/bigdata.go

    func (z *SmallPtr) M() int64 { return int64(z.a) }
    
    type IntPtr int32
    func (z *IntPtr) M() int64 { return int64(*z) }
    
    var bad bool
    
    func test(name string, i I) {
    	m := i.M()
    	if m != 12345 {
    		println(name, m)
    		bad = true
    	}
    }
    
    func ptrs() {
    	var bigptr BigPtr = BigPtr{ 10000, 2000, 300, 45 }
    	var smallptr SmallPtr = SmallPtr{ 12345 }
    	var intptr IntPtr = 12345
    
    //	test("bigptr", bigptr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 06:33:41 UTC 2012
    - 1.4K bytes
    - Viewed (0)
  2. src/internal/reflectlite/set_test.go

    	x any
    	t any
    	b bool
    }{
    	{new(chan int), new(<-chan int), true},
    	{new(<-chan int), new(chan int), false},
    	{new(*int), new(IntPtr), true},
    	{new(IntPtr), new(*int), true},
    	{new(IntPtr), new(IntPtr1), false},
    	{new(Ch), new(<-chan any), true},
    	// test runs implementsTests too
    }
    
    type IntPtr *int
    type IntPtr1 *int
    type Ch <-chan any
    
    func TestAssignableTo(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/_gen/dec.rules

        (Load <typ.Int>
          (OffPtr <typ.IntPtr> [config.PtrSize] ptr)
          mem)
        (Load <typ.Int>
          (OffPtr <typ.IntPtr> [2*config.PtrSize] ptr)
          mem))
    (Store {t} dst (SliceMake ptr len cap) mem) =>
      (Store {typ.Int}
        (OffPtr <typ.IntPtr> [2*config.PtrSize] dst)
        cap
        (Store {typ.Int}
          (OffPtr <typ.IntPtr> [config.PtrSize] dst)
          len
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  4. src/reflect/set_test.go

    	t any
    	b bool
    }{
    	{new(chan int), new(<-chan int), true},
    	{new(<-chan int), new(chan int), false},
    	{new(*int), new(IntPtr), true},
    	{new(IntPtr), new(*int), true},
    	{new(IntPtr), new(IntPtr1), false},
    	{new(Ch), new(<-chan any), true},
    	// test runs implementsTests too
    }
    
    type IntPtr *int
    type IntPtr1 *int
    type Ch <-chan any
    
    func TestAssignableTo(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 13:56:11 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  5. pkg/kubelet/kubelet_server_journal_test.go

    		{name: "boot out of range", Services: []string{service1}, options: options{Boot: intPtr(1)}, wantErr: true},
    		{name: "tailLines", Services: []string{service1}, options: options{TailLines: intPtr(100)}},
    		{name: "tailLines out of range", Services: []string{service1}, options: options{TailLines: intPtr(100000)}},
    	}
    	for _, tt := range tests {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 10 22:27:44 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  6. src/internal/types/testdata/examples/operations.go

    }
    
    func _[P interface{ *int }](p P) {
            _ = *p
    }
    
    func _[P interface{ *int | *string }](p P) {
            _ = *p // ERROR "must have identical base types"
    }
    
    type intPtr *int
    
    func _[P interface{ *int | intPtr } ](p P) {
            var _ int = *p
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:25 UTC 2023
    - 582 bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/rewritedec.go

    	for {
    		t := v.Type
    		ptr := v_0
    		mem := v_1
    		if !(t.IsString()) {
    			break
    		}
    		v.reset(OpStringMake)
    		v0 := b.NewValue0(v.Pos, OpLoad, typ.BytePtr)
    		v0.AddArg2(ptr, mem)
    		v1 := b.NewValue0(v.Pos, OpLoad, typ.Int)
    		v2 := b.NewValue0(v.Pos, OpOffPtr, typ.IntPtr)
    		v2.AuxInt = int64ToAuxInt(config.PtrSize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  8. cluster/gce/windows/common.psm1

    public static extern IntPtr CreateFileW(
      String lpFileName,
      UInt32 dwDesiredAccess,
      UInt32 dwShareMode,
      IntPtr lpSecurityAttributes,
      UInt32 dwCreationDisposition,
      UInt32 dwFlagsAndAttributes,
      IntPtr hTemplateFile
    );
    
    [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
    public static extern bool SetFilePointer(
      IntPtr hFile,
      Int32  lDistanceToMove,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 19 14:47:38 UTC 2022
    - 25.4K bytes
    - Viewed (0)
  9. src/database/sql/convert_test.go

    	}
    }
    
    func intPtrValue(intptr any) any {
    	return reflect.Indirect(reflect.Indirect(reflect.ValueOf(intptr))).Int()
    }
    
    func intValue(intptr any) int64 {
    	return reflect.Indirect(reflect.ValueOf(intptr)).Int()
    }
    
    func uintValue(intptr any) uint64 {
    	return reflect.Indirect(reflect.ValueOf(intptr)).Uint()
    }
    
    func float64Value(ptr any) float64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 10 20:23:22 UTC 2024
    - 17K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/fuse_test.go

    		Bloc("entry",
    			Valu("mem", OpInitMem, types.TypeMem, 0, nil),
    			Valu("c1", OpArg, c.config.Types.Bool, 0, nil),
    			Valu("p", OpArg, c.config.Types.IntPtr, 0, nil),
    			If("c1", "z0", "exit")),
    		Bloc("z0",
    			Valu("nilcheck", OpNilCheck, c.config.Types.IntPtr, 0, nil, "p", "mem"),
    			Goto("exit")),
    		Bloc("exit",
    			Exit("mem"),
    		))
    	CheckFunc(fun.f)
    	fuseLate(fun.f)
    	z0, ok := fun.blocks["z0"]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 7.4K bytes
    - Viewed (0)
Back to top