mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Explicit cast of size_t to 32 bit integer
Ensures compilation with nan 1.5.0+
This commit is contained in:
parent
850c2ecdd6
commit
065ce6454b
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sharp",
|
||||
"version": "0.8.3",
|
||||
"version": "0.8.4",
|
||||
"author": "Lovell Fuller <npm@lovell.info>",
|
||||
"contributors": [
|
||||
"Pierre Inglebert <pierre.inglebert@gmail.com>",
|
||||
@ -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": {
|
||||
|
@ -725,13 +725,13 @@ class ResizeWorker : public NanAsyncWorker {
|
||||
argv[1] = NanNewBufferHandle(static_cast<char*>(baton->bufferOut), baton->bufferOutLength);
|
||||
g_free(baton->bufferOut);
|
||||
// Add buffer size to info
|
||||
info->Set(NanNew<String>("size"), NanNew<Integer>(baton->bufferOutLength));
|
||||
info->Set(NanNew<String>("size"), NanNew<Uint32>(static_cast<uint32_t>(baton->bufferOutLength)));
|
||||
argv[2] = info;
|
||||
} else {
|
||||
// Add file size to info
|
||||
struct stat st;
|
||||
g_stat(baton->output.c_str(), &st);
|
||||
info->Set(NanNew<String>("size"), NanNew<Integer>(st.st_size));
|
||||
info->Set(NanNew<String>("size"), NanNew<Uint32>(static_cast<uint32_t>(st.st_size)));
|
||||
argv[1] = info;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user