From 5005c3c72c232915935b97800781467767964660 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 18 Jan 2020 10:55:31 +0100 Subject: lib,src: switch Buffer::kMaxLength to size_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-By: David Carlier Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Tobias Nießen Reviewed-By: Shelley Vohr --- src/node_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/node_buffer.h') 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); -- cgit v1.2.3