Permalink
Browse files

explicitly cast the after work callback function to 'uv_after_work_cb…

…' for node >= v0.9.4 compat
  • Loading branch information...
1 parent 48d97bc commit b2370cc1e3bc65d81f8879bdabd3eab371aeeb06 @mnaamani committed Dec 18, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/message.cc
  2. +4 −4 src/userstate.cc
View
@@ -642,7 +642,7 @@ void MessageAppOps::QueEvent(Local<Object> obj, Persistent<Function> callback){
//baton->callback = Persistent<Function>::New(callback);
baton->callback = callback;
baton->event = Persistent<Object>::New(obj);
- int status = uv_queue_work(uv_default_loop(), &baton->request, NULL, FireEvent);
+ int status = uv_queue_work(uv_default_loop(), &baton->request, NULL, (uv_after_work_cb)FireEvent);
assert(status == 0);
}
void MessageAppOps::FireEvent(uv_work_t* req){
View
@@ -170,7 +170,7 @@ Handle<Value> UserState::Read_Keys(const Arguments& args) {
baton->arg0 = cvv8::CastFromJS<std::string>(args[0]);//filename
baton->userstate = obj->userstate_;
- int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Read_Keys, Worker_After);
+ int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Read_Keys, (uv_after_work_cb)Worker_After);
assert(status == 0);
return scope.Close(Undefined());
@@ -217,7 +217,7 @@ Handle<Value> UserState::Read_Fingerprints(const Arguments& args) {
baton->arg0 = cvv8::CastFromJS<std::string>(args[0]);//filename
baton->userstate = obj->userstate_;
- int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Read_Fingerprints, Worker_After);
+ int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Read_Fingerprints, (uv_after_work_cb)Worker_After);
assert(status == 0);
return scope.Close(Undefined());
@@ -265,7 +265,7 @@ Handle<Value> UserState::Write_Fingerprints(const Arguments& args) {
baton->arg0 = cvv8::CastFromJS<std::string>(args[0]);//filename
baton->userstate = obj->userstate_;
- int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Write_Fingerprints, Worker_After);
+ int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Write_Fingerprints, (uv_after_work_cb)Worker_After);
assert(status == 0);
return Undefined();
@@ -307,7 +307,7 @@ Handle<Value> UserState::Generate_Key(const Arguments& args) {
baton->arg2 = cvv8::CastFromJS<std::string>(args[2]);//protocol
baton->userstate = obj->userstate_;
- int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Generate_Key, Worker_After);
+ int status = uv_queue_work(uv_default_loop(), &baton->request, Worker_Generate_Key, (uv_after_work_cb)Worker_After);
assert(status == 0);
return Undefined();

0 comments on commit b2370cc

Please sign in to comment.