- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for Balint (0.18 sec)
-
src/bufio/scan.go
s.end -= s.start s.start = 0 } // Is the buffer full? If so, resize. if s.end == len(s.buf) { // Guarantee no overflow in the multiplication below. const maxInt = int(^uint(0) >> 1) if len(s.buf) >= s.maxTokenSize || len(s.buf) > maxInt/2 { s.setErr(ErrTooLong) return false } newSize := len(s.buf) * 2 if newSize == 0 { newSize = startBufSize }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Oct 23 09:06:30 GMT 2023 - 14.2K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"1 2 3 4", " ", 3, []string{"1", "2", "3 4"}}, {"1 2", " ", 3, []string{"1", "2"}}, {"123", "", 2, []string{"1", "23"}}, {"123", "", 17, []string{"1", "2", "3"}}, {"bT", "T", math.MaxInt / 4, []string{"b", ""}}, {"\xff-\xff", "", -1, []string{"\xff", "-", "\xff"}}, {"\xff-\xff", "-", -1, []string{"\xff", "\xff"}}, } func TestSplit(t *testing.T) { for _, tt := range splittests {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
src/bytes/bytes.go
// Just return a copy. return append([]byte(nil), s[0]...) } var n int if len(sep) > 0 { if len(sep) >= maxInt/(len(s)-1) { panic("bytes: Join output length overflow") } n += len(sep) * (len(s) - 1) } for _, v := range s { if len(v) > maxInt-n { panic("bytes: Join output length overflow") } n += len(v) } b := bytealg.MakeNoZero(n)[:n:n]
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Feb 19 19:51:15 GMT 2024 - 33.8K bytes - Viewed (0) -
src/bytes/buffer_test.go
if err := recover(); err != ErrTooLarge { t.Errorf("after too-large Grow, recover() = %v; want %v", err, ErrTooLarge) } }() buf := NewBuffer(make([]byte, 1)) const maxInt = int(^uint(0) >> 1) buf.Grow(maxInt) } // Was a bug: used to give EOF reading empty slice at EOF. func TestReadEmptyAtEOF(t *testing.T) { b := new(Buffer) slice := make([]byte, 0) n, err := b.Read(slice)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/bytes/buffer.go
var ErrTooLarge = errors.New("bytes.Buffer: too large") var errNegativeRead = errors.New("bytes.Buffer: reader returned negative count from Read") const maxInt = int(^uint(0) >> 1) // Bytes returns a slice of length b.Len() holding the unread portion of the buffer. // The slice is valid for use only until the next buffer modification (that is,
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 15.7K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Nov 02 16:43:23 GMT 2023 - 97K bytes - Viewed (0) -
src/archive/zip/writer.go
b.uint16(h.Flags) b.uint16(h.Method) b.uint16(h.ModifiedTime) b.uint16(h.ModifiedDate) b.uint32(h.CRC32) if h.isZip64() || h.offset >= uint32max { // the file needs a zip64 header. store maxint in both // 32 bit size fields (and offset later) to signal that the // zip64 extra header should be used. b.uint32(uint32max) // compressed size b.uint32(uint32max) // uncompressed size
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Apr 04 14:28:57 GMT 2024 - 19.3K bytes - Viewed (0)