Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 93 for Int8 (0.08 sec)

  1. src/reflect/value.go

    // It panics if v's Kind is not [Int], [Int8], [Int16], [Int32], or [Int64], or if [Value.CanSet] returns false.
    func (v Value) SetInt(x int64) {
    	v.mustBeAssignable()
    	switch k := v.kind(); k {
    	default:
    		panic(&ValueError{"reflect.Value.SetInt", v.kind()})
    	case Int:
    		*(*int)(v.ptr) = int(x)
    	case Int8:
    		*(*int8)(v.ptr) = int8(x)
    	case Int16:
    		*(*int16)(v.ptr) = int16(x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  2. src/internal/fmtsort/sort.go

    	aType, bType := aVal.Type(), bVal.Type()
    	if aType != bType {
    		return -1 // No good answer possible, but don't return 0: they're not equal.
    	}
    	switch aVal.Kind() {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		return cmp.Compare(aVal.Int(), bVal.Int())
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:31:45 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. src/encoding/gob/encode.go

    	b := v.Bool()
    	if b || state.sendZero {
    		state.update(i)
    		if b {
    			state.encodeUint(1)
    		} else {
    			state.encodeUint(0)
    		}
    	}
    }
    
    // encInt encodes the signed integer (int int8 int16 int32 int64) referenced by v.
    func encInt(i *encInstr, state *encoderState, v reflect.Value) {
    	value := v.Int()
    	if value != 0 || state.sendZero {
    		state.update(i)
    		state.encodeInt(value)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. src/text/template/funcs.go

    		return value, nil
    	}
    	return reflect.Value{}, fmt.Errorf("value has type %s; should be %s", value.Type(), argType)
    }
    
    func intLike(typ reflect.Kind) bool {
    	switch typ {
    	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
    		return true
    	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
    		return true
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  5. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.gcWriteBarrier", 1},
    	{"runtime.duffzero", 1},
    	{"runtime.duffcopy", 1},
    	{"runtime.morestack", 0},
    	{"runtime.morestackc", 0},
    	{"runtime.morestack_noctxt", 0},
    	{"type:int8", 0},
    	{"type:*int8", 0},
    	{"type:uint8", 0},
    	{"type:*uint8", 0},
    	{"type:int16", 0},
    	{"type:*int16", 0},
    	{"type:uint16", 0},
    	{"type:*uint16", 0},
    	{"type:int32", 0},
    	{"type:*int32", 0},
    	{"type:uint32", 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  6. src/encoding/json/encode.go

    }
    
    func isEmptyValue(v reflect.Value) bool {
    	switch v.Kind() {
    	case reflect.Array, reflect.Map, reflect.Slice, reflect.String:
    		return v.Len() == 0
    	case reflect.Bool,
    		reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
    		reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
    		reflect.Float32, reflect.Float64,
    		reflect.Interface, reflect.Pointer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  7. src/runtime/alg.go

    	return typehash(t, p, h)
    }
    
    func memequal0(p, q unsafe.Pointer) bool {
    	return true
    }
    func memequal8(p, q unsafe.Pointer) bool {
    	return *(*int8)(p) == *(*int8)(q)
    }
    func memequal16(p, q unsafe.Pointer) bool {
    	return *(*int16)(p) == *(*int16)(q)
    }
    func memequal32(p, q unsafe.Pointer) bool {
    	return *(*int32)(p) == *(*int32)(q)
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. src/log/slog/value_test.go

    		{uint(2), Uint64Value(2)},
    		{uint8(3), Uint64Value(3)},
    		{uint16(4), Uint64Value(4)},
    		{uint32(5), Uint64Value(5)},
    		{uint64(6), Uint64Value(6)},
    		{uintptr(7), Uint64Value(7)},
    		{int8(8), Int64Value(8)},
    		{int16(9), Int64Value(9)},
    		{int32(10), Int64Value(10)},
    		{int64(11), Int64Value(11)},
    	} {
    		got := AnyValue(test.in)
    		if !got.Equal(test.want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:12:08 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  9. scan.go

    			db.RowsAffected++
    			db.AddError(rows.Scan(values...))
    
    			mapValue := map[string]interface{}{}
    			scanIntoMap(mapValue, values, columns)
    			*dest = append(*dest, mapValue)
    		}
    	case *int, *int8, *int16, *int32, *int64,
    		*uint, *uint8, *uint16, *uint32, *uint64, *uintptr,
    		*float32, *float64,
    		*bool, *string, *time.Time,
    		*sql.NullInt32, *sql.NullInt64, *sql.NullFloat64,
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10K bytes
    - Viewed (0)
  10. src/internal/fmtsort/sort_test.go

    	"internal/fmtsort"
    	"math"
    	"reflect"
    	"runtime"
    	"slices"
    	"strings"
    	"testing"
    	"unsafe"
    )
    
    var compareTests = [][]reflect.Value{
    	ct(reflect.TypeOf(int(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int8(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int16(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int32(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int64(0)), -1, 0, 1),
    	ct(reflect.TypeOf(uint(0)), 0, 1, 5),
    	ct(reflect.TypeOf(uint8(0)), 0, 1, 5),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.9K bytes
    - Viewed (0)
Back to top