From 065ce6454b0db9b60dc7b0acc38aec873d59c43b Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 15 Jan 2015 15:16:01 +0000 Subject: [PATCH] Explicit cast of size_t to 32 bit integer Ensures compilation with nan 1.5.0+ --- package.json | 6 +++--- src/resize.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 06a684e8..9258e179 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sharp", - "version": "0.8.3", + "version": "0.8.4", "author": "Lovell Fuller ", "contributors": [ "Pierre Inglebert ", @@ -34,9 +34,9 @@ "vips" ], "dependencies": { - "bluebird": "^2.3.11", + "bluebird": "^2.6.4", "color": "^0.7.3", - "nan": "^1.4.1", + "nan": "^1.5.1", "semver": "^4.1.0" }, "devDependencies": { diff --git a/src/resize.cc b/src/resize.cc index 34ca878a..e6d322dc 100755 --- a/src/resize.cc +++ b/src/resize.cc @@ -725,13 +725,13 @@ class ResizeWorker : public NanAsyncWorker { argv[1] = NanNewBufferHandle(static_cast(baton->bufferOut), baton->bufferOutLength); g_free(baton->bufferOut); // Add buffer size to info - info->Set(NanNew("size"), NanNew(baton->bufferOutLength)); + info->Set(NanNew("size"), NanNew(static_cast(baton->bufferOutLength))); argv[2] = info; } else { // Add file size to info struct stat st; g_stat(baton->output.c_str(), &st); - info->Set(NanNew("size"), NanNew(st.st_size)); + info->Set(NanNew("size"), NanNew(static_cast(st.st_size))); argv[1] = info; } }