Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for SliceAt (0.24 sec)

  1. doc/next/6-stdlib/99-minor/reflect/61308.md

    The [SliceAt(typ Type, p unsafe.Pointer, len int)] function
    returns a Value representing a slice whose underlying array starts
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 12 20:57:18 UTC 2024
    - 170 bytes
    - Viewed (0)
  2. api/go1.23.txt

    pkg os, func CopyFS(string, fs.FS) error #62484
    pkg path/filepath, func Localize(string) (string, error) #57151
    pkg reflect, func SliceAt(Type, unsafe.Pointer, int) Value #61308
    pkg reflect, method (Value) Seq() iter.Seq[Value] #66056
    pkg reflect, method (Value) Seq2() iter.Seq2[Value, Value] #66056
    pkg reflect, type Type interface, CanSeq() bool #66056
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 20:48:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  3. src/reflect/all_test.go

    	}
    
    	typ = TypeOf(0)
    	if !SliceAt(typ, unsafe.Pointer((*int)(nil)), 0).IsNil() {
    		t.Fatal("nil pointer with zero length must return nil")
    	}
    
    	// nil pointer with positive length panics
    	shouldPanic("", func() { _ = SliceAt(typ, unsafe.Pointer((*int)(nil)), 1) })
    
    	// negative length
    	var neg int = -1
    	shouldPanic("", func() { _ = SliceAt(TypeOf(byte(0)), unsafe.Pointer(&p[0]), neg) })
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  4. src/reflect/value.go

    	return Value{&typ.(*rtype).t, unsafe.Pointer(&s), flagIndir | flag(Slice)}
    }
    
    // SliceAt returns a [Value] representing a slice whose underlying
    // data starts at p, with length and capacity equal to n.
    //
    // This is like [unsafe.Slice].
    func SliceAt(typ Type, p unsafe.Pointer, n int) Value {
    	unsafeslice(typ.common(), p, n)
    	s := unsafeheader.Slice{Data: p, Len: n, Cap: n}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  5. test/gcgort.go

    	case a.pointerT == nil:
    		return errors.New(a.name + " missing pointerT")
    	case a.arrayT == nil:
    		return errors.New(a.name + " missing arrayT")
    	case a.sliceT == nil:
    		return errors.New(a.name + " missing sliceT")
    	case a.mapT == nil:
    		return errors.New(a.name + " missing mapT")
    	case a.mapPointerKeyT == nil:
    		return errors.New(a.name + " missing mapPointerKeyT")
    	case a.chanT == nil:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 08 21:15:48 UTC 2018
    - 34.5K bytes
    - Viewed (0)
  6. src/encoding/gob/debug.go

    		fmt.Fprintf(os.Stderr, "%skey id=%d\n", indent+1, wire.MapT.Key)
    		fmt.Fprintf(os.Stderr, "%selem id=%d\n", indent+1, wire.MapT.Elem)
    	case wire.SliceT != nil:
    		deb.printCommonType(indent, "slice", &wire.SliceT.CommonType)
    		fmt.Fprintf(os.Stderr, "%selem id=%d\n", indent+1, wire.SliceT.Elem)
    	case wire.StructT != nil:
    		deb.printCommonType(indent, "struct", &wire.StructT.CommonType)
    		for i, field := range wire.StructT.Field {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 09:34:41 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  7. src/encoding/gob/type.go

    	const unknown = "unknown type"
    	if w == nil {
    		return unknown
    	}
    	switch {
    	case w.ArrayT != nil:
    		return w.ArrayT.Name
    	case w.SliceT != nil:
    		return w.SliceT.Name
    	case w.StructT != nil:
    		return w.StructT.Name
    	case w.MapT != nil:
    		return w.MapT.Name
    	case w.GobEncoderT != nil:
    		return w.GobEncoderT.Name
    	case w.BinaryMarshalerT != nil:
    		return w.BinaryMarshalerT.Name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  8. src/encoding/gob/decode.go

    			elemOp := dec.decIgnoreOpFor(elemId, inProgress, depth+1)
    			op = func(i *decInstr, state *decoderState, value reflect.Value) {
    				state.dec.ignoreMap(state, *keyOp, *elemOp)
    			}
    
    		case wire.SliceT != nil:
    			elemId := wire.SliceT.Elem
    			elemOp := dec.decIgnoreOpFor(elemId, inProgress, depth+1)
    			op = func(i *decInstr, state *decoderState, value reflect.Value) {
    				state.dec.ignoreSlice(state, *elemOp)
    			}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  9. src/encoding/gob/doc.go

    pair (-type id, encoded-type) where encoded-type is the gob encoding of a wireType
    description, constructed from these types:
    
    	type wireType struct {
    		ArrayT           *ArrayType
    		SliceT           *SliceType
    		StructT          *StructType
    		MapT             *MapType
    		GobEncoderT      *gobEncoderType
    		BinaryMarshalerT *gobEncoderType
    		TextMarshalerT   *gobEncoderType
    
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 17.1K bytes
    - Viewed (0)
Back to top