Commit 0493c068 by Dane Springmeyer

Merge pull request #386 from mapbox/iojs

Upgrade to nan@1.5.0 / Fix compile against io.js
parents 78a134bd 44d8b7a7
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
"url": "git://github.com/mapbox/node-sqlite3.git" "url": "git://github.com/mapbox/node-sqlite3.git"
}, },
"dependencies": { "dependencies": {
"nan": "~1.4.1", "nan": "~1.5.0",
"node-pre-gyp": "~0.6.1" "node-pre-gyp": "~0.6.1"
}, },
"bundledDependencies": [ "bundledDependencies": [
......
...@@ -437,7 +437,7 @@ void Database::ProfileCallback(Database *db, ProfileInfo* info) { ...@@ -437,7 +437,7 @@ void Database::ProfileCallback(Database *db, ProfileInfo* info) {
Local<Value> argv[] = { Local<Value> argv[] = {
NanNew("profile"), NanNew("profile"),
NanNew<String>(info->sql.c_str()), NanNew<String>(info->sql.c_str()),
NanNew<Integer>((double)info->nsecs / 1000000.0) NanNew<Number>((double)info->nsecs / 1000000.0)
}; };
EMIT_EVENT(NanObjectWrapHandle(db), 3, argv); EMIT_EVENT(NanObjectWrapHandle(db), 3, argv);
delete info; delete info;
...@@ -482,7 +482,7 @@ void Database::UpdateCallback(Database *db, UpdateInfo* info) { ...@@ -482,7 +482,7 @@ void Database::UpdateCallback(Database *db, UpdateInfo* info) {
NanNew(sqlite_authorizer_string(info->type)), NanNew(sqlite_authorizer_string(info->type)),
NanNew<String>(info->database.c_str()), NanNew<String>(info->database.c_str()),
NanNew<String>(info->table.c_str()), NanNew<String>(info->table.c_str()),
NanNew<Integer>(info->rowid), NanNew<Number>(info->rowid),
}; };
EMIT_EVENT(NanObjectWrapHandle(db), 4, argv); EMIT_EVENT(NanObjectWrapHandle(db), 4, argv);
delete info; delete info;
......
...@@ -477,7 +477,7 @@ void Statement::Work_AfterRun(uv_work_t* req) { ...@@ -477,7 +477,7 @@ void Statement::Work_AfterRun(uv_work_t* req) {
// Fire callbacks. // Fire callbacks.
Local<Function> cb = NanNew(baton->callback); Local<Function> cb = NanNew(baton->callback);
if (!cb.IsEmpty() && cb->IsFunction()) { if (!cb.IsEmpty() && cb->IsFunction()) {
NanObjectWrapHandle(stmt)->Set(NanNew("lastID"), NanNew<Integer>(baton->inserted_id)); NanObjectWrapHandle(stmt)->Set(NanNew("lastID"), NanNew<Number>(baton->inserted_id));
NanObjectWrapHandle(stmt)->Set(NanNew("changes"), NanNew<Integer>(baton->changes)); NanObjectWrapHandle(stmt)->Set(NanNew("changes"), NanNew<Integer>(baton->changes));
Local<Value> argv[] = { NanNew(NanNull()) }; Local<Value> argv[] = { NanNew(NanNull()) };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment