Skip to content

Commit

Permalink
Address most PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
teo-tsirpanis committed Nov 26, 2024
1 parent 8da0d7f commit e524c53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ func (b *Buffer) WriteTo(w io.Writer) (int64, error) {
// Keep the buffer alive during the write, to prevent the GC from
// collecting the memory while it's being used.
n, err := w.Write(unsafe.Slice((*byte)(cbuffer), writeSize))
runtime.KeepAlive(b)

cbuffer = unsafe.Pointer(uintptr(cbuffer) + uintptr(n))
remaining -= int64(n)
Expand Down
2 changes: 1 addition & 1 deletion buffer_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (b *BufferList) Context() *Context {
}

// WriteTo writes the contents of a BufferList to an io.Writer.
func (b *BufferList) WriteTo(w io.Writer) (n int64, err error) {
func (b *BufferList) WriteTo(w io.Writer) (int64, error) {
nbuffs, err := b.NumBuffers()
if err != nil {
return 0, err
Expand Down
4 changes: 2 additions & 2 deletions serialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func DeserializeArraySchema(buffer *Buffer, serializationType SerializationType,
return &schema, nil
}

// SerializeArrayNonEmptyDomain gets and serializes the array nonempty domain.
// SerializeArrayNonEmptyDomainToBuffer gets and serializes the array nonempty domain and returns a Buffer object containing the payload.
func SerializeArrayNonEmptyDomainToBuffer(a *Array, serializationType SerializationType) (*Buffer, error) {
schema, err := a.Schema()
if err != nil {
Expand Down Expand Up @@ -109,7 +109,7 @@ func SerializeArrayNonEmptyDomainToBuffer(a *Array, serializationType Serializat
return &buffer, nil
}

// SerializeArrayNonEmptyDomainToBuffer gets and serializes the array nonempty domain and returns a Buffer object containing the payload.
// SerializeArrayNonEmptyDomain gets and serializes the array nonempty domain.
//
// Deprecated: Use SerializeArrayNonEmptyDomainToBuffer instead.
func SerializeArrayNonEmptyDomain(a *Array, serializationType SerializationType) ([]byte, error) {
Expand Down

0 comments on commit e524c53

Please sign in to comment.