src: redo unaligned access workaround by bnoordhuis · Pull Request #138 · nodejs/node

added 2 commits

December 14, 2014 16:01
Introduce two-byte overloads of node::Encode() and StringBytes::Encode()
that ensure that the input is suitably aligned.

Revisits commit 535fec8 from yesterday.
Move the big endian to little endian conversion logic for UCS2 input
from src/string_bytes.cc to src/node_buffer.cc; StringSlice() is the
only function that actually needs it and with this commit, a second
copy is avoided on big endian architectures.