Browse Source

Fast Buffer safe constructor

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
2dda6be799
  1. 4
      lib/buffer.js

4
lib/buffer.js

@ -91,6 +91,10 @@ function allocPool () {
function Buffer (subject, encoding, legacy, slice_legacy) {
if (!(this instanceof Buffer)) {
return new Buffer(subject, encoding, legacy, slice_legacy);
}
var length, type;
// Are we slicing?

Loading…
Cancel
Save