diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2020-01-18 12:55:31 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-01-22 00:55:40 +0300 |
commit | 5005c3c72c232915935b97800781467767964660 (patch) | |
tree | 7f2e9e8740e643f99a035aeb2417e13ebe359f88 /src/node_buffer.h | |
parent | da66054e5d584bad7e5b3691f50deb1a5a8a4f53 (diff) |
lib,src: switch Buffer::kMaxLength to size_t
Change the type of `Buffer::kMaxLength` to size_t because upcoming
changes in V8 will allow typed arrays > 2 GB on 64 bits platforms.
Not all platforms handle file reads and writes > 2 GB though so keep
enforcing the 2 GB typed array limit for I/O operations.
Fixes: https://github.com/nodejs/node/issues/31399
Refs: https://github.com/libuv/libuv/pull/1501
PR-URL: https://github.com/nodejs/node/pull/31406
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r-- | src/node_buffer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h index 11010017ce0..606a6f5caa3 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -29,7 +29,7 @@ namespace node { namespace Buffer { -static const unsigned int kMaxLength = v8::TypedArray::kMaxLength; +static const size_t kMaxLength = v8::TypedArray::kMaxLength; typedef void (*FreeCallback)(char* data, void* hint); |