Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 104 for srcbuf (0.12 sec)

  1. src/text/scanner/scanner.go

    	// Typically, token text is stored completely in srcBuf, but in general
    	// the token text's head may be buffered in tokBuf while the token text's
    	// tail is stored in srcBuf.
    	tokBuf bytes.Buffer // token text head that is not in srcBuf anymore
    	tokPos int          // token text tail position (srcBuf index); valid if >= 0
    	tokEnd int          // token text tail end (srcBuf index)
    
    	// One character look-ahead
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    	srcBuf := bytes.NewBuffer(make([]byte, 8192))
    	src := NewReader(onlyReader{srcBuf})
    	dstBuf := new(bytes.Buffer)
    	dst := onlyWriter{dstBuf}
    	for i := 0; i < b.N; i++ {
    		srcBuf.Reset()
    		src.Reset(onlyReader{srcBuf})
    		dstBuf.Reset()
    		io.Copy(dst, src)
    	}
    }
    
    func BenchmarkReaderCopyNoWriteTo(b *testing.B) {
    	srcBuf := bytes.NewBuffer(make([]byte, 8192))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:56:01 UTC 2023
    - 51.5K bytes
    - Viewed (0)
  3. src/crypto/aes/gcm_s390x.go

    	// buffer for counter values.
    	var ctrbuf, srcbuf [2048]byte
    	for len(src) >= 16 {
    		siz := len(src)
    		if len(src) > len(ctrbuf) {
    			siz = len(ctrbuf)
    		}
    		siz &^= 0xf // align siz to 16-bytes
    		copy(srcbuf[:], src[:siz])
    		cryptBlocksGCM(g.block.function, g.block.key, dst[:siz], srcbuf[:siz], ctrbuf[:], cnt)
    		src = src[siz:]
    		dst = dst[siz:]
    	}
    	if len(src) > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 11.3K bytes
    - Viewed (0)
  4. cmd/object-api-utils_test.go

    			}
    
    			var decBuf bytes.Buffer
    			decRdr := s2.NewReader(&rdrBuf)
    			_, err = io.Copy(&decBuf, decRdr)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			if !bytes.Equal(tt.data, decBuf.Bytes()) {
    				t.Errorf("roundtrip failed\n\t%q\n\t%q", tt.data, decBuf.Bytes())
    			}
    		})
    	}
    }
    
    func Test_pathNeedsClean(t *testing.T) {
    	type pathTest struct {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  5. src/cmd/gofmt/gofmt_unix_test.go

    	initRewrite()
    
    	const maxWeight = 2 << 20
    	var buf, errBuf strings.Builder
    	s := newSequencer(maxWeight, &buf, &errBuf)
    	s.Add(fileWeight(fn, info), func(r *reporter) error {
    		return processFile(fn, info, nil, r)
    	})
    	if s.GetExitCode() == 0 {
    		t.Fatal("rewrite of read-only file succeeded unexpectedly")
    	}
    	if errBuf.Len() > 0 {
    		t.Log(errBuf)
    	}
    
    	info, err = os.Stat(fn)
    	if err != nil {
    		t.Fatal(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 12:52:14 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/outbuf.go

    func (out *OutBuf) Write16(v uint16) {
    	out.arch.ByteOrder.PutUint16(out.encbuf[:], v)
    	out.Write(out.encbuf[:2])
    }
    
    func (out *OutBuf) Write32(v uint32) {
    	out.arch.ByteOrder.PutUint32(out.encbuf[:], v)
    	out.Write(out.encbuf[:4])
    }
    
    func (out *OutBuf) Write32b(v uint32) {
    	binary.BigEndian.PutUint32(out.encbuf[:], v)
    	out.Write(out.encbuf[:4])
    }
    
    func (out *OutBuf) Write64(v uint64) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 17 19:51:29 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  7. src/runtime/tracestack.go

    	} else if len(pcBuf) > 0 && pcBuf[0] == logicalStackSentinel {
    		// pcBuf contains logical rather than inlined frames, skip has already been
    		// applied, just return it without the sentinel value in pcBuf[0].
    		return copy(dst, pcBuf[1:])
    	}
    
    	var (
    		n          int
    		lastFuncID = abi.FuncIDNormal
    		skip       = pcBuf[0]
    		// skipOrAdd skips or appends retPC to newPCBuf and returns true if more
    		// pcs can be added.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 14:38:56 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. src/cmd/internal/obj/x86/seh.go

    	"fmt"
    	"math"
    )
    
    type sehbuf struct {
    	ctxt *obj.Link
    	data []byte
    	off  int
    }
    
    func newsehbuf(ctxt *obj.Link, nodes uint8) sehbuf {
    	// - 8 bytes for the header
    	// - 2 bytes for each node
    	// - 2 bytes in case nodes is not even
    	size := 8 + nodes*2
    	if nodes%2 != 0 {
    		size += 2
    	}
    	return sehbuf{ctxt, make([]byte, size), 0}
    }
    
    func (b *sehbuf) write8(v uint8) {
    	b.data[b.off] = v
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 14:41:10 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. src/encoding/hex/hex_test.go

    			}
    
    			dec := NewDecoder(&buf)
    			var decBuf bytes.Buffer
    			w := struct{ io.Writer }{&decBuf} // io.Writer only; not io.ReaderFrom
    			if _, err := io.CopyBuffer(w, dec, make([]byte, 7)); err != nil || decBuf.Len() != len(input) {
    				t.Errorf("decoder.Read(%q*%d) = (%d, %v), want (%d, nil)", test.enc, multiplier, decBuf.Len(), err, len(input))
    			}
    
    			if !bytes.Equal(decBuf.Bytes(), input) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:30:23 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. test/linkx_run.go

    	cmd := exec.Command("go", "run", "-ldflags=-X main.tbd"+sep+"hello -X main.overwrite"+sep+"trumped -X main.nosuchsymbol"+sep+"neverseen", "linkx.go")
    	var out, errbuf bytes.Buffer
    	cmd.Stdout = &out
    	cmd.Stderr = &errbuf
    	err := cmd.Run()
    	if err != nil {
    		fmt.Println(errbuf.String())
    		fmt.Println(out.String())
    		fmt.Println(err)
    		os.Exit(1)
    	}
    
    	want := "hello\nhello\nhello\ntrumped\ntrumped\ntrumped\n"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.7K bytes
    - Viewed (0)
Back to top