1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-27 04:25:44 -05:00

rename NewLocal to NewSize

This commit is contained in:
Darien Raymond
2018-03-11 23:29:17 +01:00
parent f97e6fa3d2
commit 994aecd13c
13 changed files with 18 additions and 18 deletions

View File

@@ -172,15 +172,15 @@ func (b *Buffer) String() string {
return string(b.Bytes())
}
// New creates a Buffer with 0 length and 8K capacity.
// New creates a Buffer with 0 length and 2K capacity.
func New() *Buffer {
return &Buffer{
v: pool2k.Get().([]byte),
}
}
// NewLocal creates and returns a buffer with 0 length and given capacity on current thread.
func NewLocal(size uint32) *Buffer {
// NewSize creates and returns a buffer given capacity.
func NewSize(size uint32) *Buffer {
return &Buffer{
v: NewBytes(size),
}