Skip to content

Commit

Permalink
Merge pull request #386 from mapbox/iojs
Browse files Browse the repository at this point in the history
Upgrade to nan@1.5.0 / Fix compile against io.js
  • Loading branch information
Dane Springmeyer committed Jan 16, 2015
2 parents 78a134b + 44d8b7a commit 0493c06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"url": "git://github.com/mapbox/node-sqlite3.git"
},
"dependencies": {
"nan": "~1.4.1",
"nan": "~1.5.0",
"node-pre-gyp": "~0.6.1"
},
"bundledDependencies": [
Expand Down
4 changes: 2 additions & 2 deletions src/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ void Database::ProfileCallback(Database *db, ProfileInfo* info) {
Local<Value> argv[] = {
NanNew("profile"),
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);
delete info;
Expand Down Expand Up @@ -482,7 +482,7 @@ void Database::UpdateCallback(Database *db, UpdateInfo* info) {
NanNew(sqlite_authorizer_string(info->type)),
NanNew<String>(info->database.c_str()),
NanNew<String>(info->table.c_str()),
NanNew<Integer>(info->rowid),
NanNew<Number>(info->rowid),
};
EMIT_EVENT(NanObjectWrapHandle(db), 4, argv);
delete info;
Expand Down
2 changes: 1 addition & 1 deletion src/statement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ void Statement::Work_AfterRun(uv_work_t* req) {
// Fire callbacks.
Local<Function> cb = NanNew(baton->callback);
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));

Local<Value> argv[] = { NanNew(NanNull()) };
Expand Down

0 comments on commit 0493c06

Please sign in to comment.