Permalink
Browse files

explicitly cast uv_after_work_cb to uv_queue_work

Per the node 0.8 -> 0.10 migration guide:
The uv_after_work_cb signature has changed to take a second integer
argument indicating status. For backwards compatibility, explicitly cast
the 4th argument to uv_queue_work.
  • Loading branch information...
1 parent db333f3 commit ed1bd7c4fe53249e6d4bc8b088036708564b6d4e @defunctzombie defunctzombie committed Jan 19, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/bcrypt_node.cc
View
@@ -254,8 +254,7 @@ Handle<Value> GenerateSalt(const Arguments &args) {
uv_work_t* req = new uv_work_t;
req->data = baton;
- uv_queue_work(uv_default_loop(), req, GenSaltAsync, GenSaltAsyncAfter);
-
+ uv_queue_work(uv_default_loop(), req, GenSaltAsync, (uv_after_work_cb)GenSaltAsyncAfter);
return Undefined();
}
@@ -334,7 +333,7 @@ Handle<Value> Encrypt(const Arguments& args) {
uv_work_t* req = new uv_work_t;
req->data = baton;
- uv_queue_work(uv_default_loop(), req, EncryptAsync, EncryptAsyncAfter);
+ uv_queue_work(uv_default_loop(), req, EncryptAsync, (uv_after_work_cb)EncryptAsyncAfter);
return Undefined();
}
@@ -428,7 +427,7 @@ Handle<Value> Compare(const Arguments& args) {
uv_work_t* req = new uv_work_t;
req->data = baton;
- uv_queue_work(uv_default_loop(), req, CompareAsync, CompareAsyncAfter);
+ uv_queue_work(uv_default_loop(), req, CompareAsync, (uv_after_work_cb)CompareAsyncAfter);
return Undefined();
}

0 comments on commit ed1bd7c

Please sign in to comment.