This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 24
API changes between v0.10 and v0.12
Mithgol edited this page Sep 15, 2013
·
10 revisions
When editing this page please be as detailed as possible. Examples are encouraged!
-
Buffer
class has been removed and replaced with a namespace. Sousing node::Buffer
will no longer work. - All
node::Buffer::New()
variants now returnLocal<Object>
instead ofBuffer*
. - The return value for
node::Buffer::New()
is an instantiated JSBuffer
object. -
node::Buffer::New(Handle<String>)
now accepts an optional second argument ofenum encoding
. - API addition of
node::Buffer::Use()
which will use the passedchar*
instead of making a copy.
- External memory is now allocated using
smalloc
, instead of usingSlowBuffer
as the parent backing. -
SlowBuffer
has been repurposed to return aBuffer
instance that has no parent backing. -
buffer.parent
now points to an object that has been allocated viasmalloc.alloc
, not aBuffer
instance, and only if the buffer is a slice. -
buffer.offset
is now a read-only prototype property equal to zero since no instance methods require working on the parent backing. - API additions
Buffer.alloc()
andBuffer.dispose()
have been added. -
Buffer#fill()
has been extended to fill with the entire passed value. -
(new Buffer('text\0!', 'ascii')).toString()
outputs'text !'
in 0.10 and'text\u0000!'
in 0.12. - Writable stream
_write()
gets called with 'buffer' encoding when chunk is a Buffer (#6119). - Writable stream emits 'finish' on next tick if there was a
write()
(#6118).
-
process.maxTickDepth
has been removed, allowingprocess.nextTick
to starve I/O indefinitely.