Skip to content

Commit

Permalink
Add Inner method to Buffer object
Browse files Browse the repository at this point in the history
  • Loading branch information
awnumar committed Oct 16, 2019
1 parent 7c82db3 commit e265d81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ func (b *Buffer) Data() []byte {
return b.data
}

// Inner returns a byte slice representing the entire inner memory pages. This should NOT be used unless you have a specific need.
func (b *Buffer) Inner() []byte {
return b.inner
}

// Freeze makes the underlying memory of a given buffer immutable. This will do nothing if the Buffer has been destroyed.
func (b *Buffer) Freeze() {
// Attain lock.
Expand Down

0 comments on commit e265d81

Please sign in to comment.