Fix for nan 1.5

This commit is contained in:
Kagami Hiiragi 2015-01-15 01:07:03 +03:00
parent 6faae5fcf4
commit ecdcd30a76
3 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@
{
"target_name": "worker",
"include_dirs": ["<!(node -e \"require('nan')\")"],
"cflags": ["-Wall", "-O2"],
"cflags": ["-Wall", "-Wextra", "-O2"],
"sources": ["src/worker.cc", "src/pow.cc"],
"conditions": [
["OS=='win'", {

View File

@ -1,5 +1,5 @@
#ifndef BITMESSAGE_POW_H
#define BITMESSAGE_POW_H
#ifndef BITCHAN_BITMESSAGE_POW_H_
#define BITCHAN_BITMESSAGE_POW_H_
static const int MAX_POOL_SIZE = 1024;
static const int HASH_SIZE = 64;
@ -10,4 +10,4 @@ int pow(size_t pool_size,
uint64_t max_nonce,
uint64_t* nonce);
#endif
#endif // BITCHAN_BITMESSAGE_POW_H_

View File

@ -10,7 +10,7 @@ using v8::Function;
using v8::Value;
using v8::Object;
using v8::String;
using v8::Integer;
using v8::Number;
static const uint64_t MAX_SAFE_INTEGER = 9007199254740991ULL;
@ -51,7 +51,7 @@ class PowWorker : public NanAsyncWorker {
}
callback->Call(1, argv);
} else {
Local<Value> argv[] = {NanNull(), NanNew<Integer>(nonce)};
Local<Value> argv[] = {NanNull(), NanNew<Number>(nonce)};
callback->Call(2, argv);
}
}