Files
node-v0.x-archive/test/simple
Ben Noordhuis 5a9d30bb86 typed arrays: copy Buffer in typed array constructor
Convert the Buffer to an ArrayBuffer. The typed_array.buffer property
should be an ArrayBuffer to avoid confusion: a Buffer doesn't have a
byteLength property and more importantly, its slice() method works
subtly different.

That means that before this commit:

  var buf = new Buffer(1);
  var arr = new Int8Array(buf);
  assert.equal(arr.buffer, buf);
  assert(arr.buffer instanceof Buffer);

And now:

  var buf = new Buffer(1);
  var arr = new Int8Array(buf);
  assert.notEqual(arr.buffer, buf);
  assert(arr.buffer instanceof ArrayBuffer);
2013-02-10 21:31:41 +01:00
..
2012-02-20 13:29:11 +01:00
2010-02-25 11:41:11 -08:00
2012-06-11 15:51:23 -07:00
2012-12-14 10:52:30 -08:00
2012-01-17 19:45:09 +01:00
2012-12-14 10:52:26 -08:00
2011-11-25 01:25:38 +01:00
2012-01-17 19:45:09 +01:00
2012-01-24 00:30:28 +06:00
2012-01-17 19:45:09 +01:00
2012-01-17 19:45:09 +01:00
2011-03-14 17:37:05 -07:00
2011-03-14 17:37:05 -07:00
2012-12-14 17:46:23 -08:00
2011-11-01 22:26:52 +01:00
2011-11-01 22:26:52 +01:00
2012-02-18 15:34:57 -08:00
2012-12-14 17:46:23 -08:00
2011-10-22 14:14:40 +09:00
2011-10-22 14:14:40 +09:00
2011-10-22 14:14:40 +09:00
2012-12-14 17:46:23 -08:00
2012-12-14 17:46:23 -08:00
2012-01-17 19:45:09 +01:00
2012-06-29 17:29:32 +02:00
2012-07-04 13:45:14 +02:00
2012-01-17 19:45:09 +01:00
2011-03-14 17:37:05 -07:00
2012-01-09 11:20:22 -08:00
2012-12-14 10:52:30 -08:00
2011-08-09 13:55:04 -07:00
2011-03-14 17:37:05 -07:00
2012-05-10 16:49:37 +02:00
2012-12-14 10:52:26 -08:00
2011-10-05 18:51:06 -07:00