-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link Internal Buffers when appending another BufferList #27
Conversation
this._bufs.push(isBuffer ? buf : new Buffer(buf)) | ||
this.length += buf.length | ||
if (buf instanceof BufferList) { | ||
this._bufs = this._bufs.concat(buf._bufs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do this._bufs.push.apply(this._bufs, buf._bufs)
to prevent creation of a new array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Im ok with this, can you forsee anyways this could break current code? It should work transparently so I'm ok with releasing this as patch. |
This provides support for node v5.6.0. Fixes #26.
0bd6c46
to
649eb39
Compare
No I think this is ok and good. The test passed as is, so I don't foresee any issue. @rvagg ? |
Let's go with this as patch and #28 as minor cause it's adding features, sorry I missed this one! |
just pushed out v1.0.3 with this |
Thanks! |
This restores support for node v5.6.0. I think we should release it as a patch upgrade, as the side effects of appending to a nested
bl()
was a bug anyway.@rvagg @jcrugzz opinions?
Fixes #26