From 99500ed8408766c512ff3101f7068a211031d4f3 Mon Sep 17 00:00:00 2001 From: mscdex Date: Thu, 7 Feb 2013 00:33:05 -0500 Subject: [PATCH] node v0.9.4+ compatibility --- 05_threadpool/modulename.cpp | 3 ++- xx_benchmark/modulename.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/05_threadpool/modulename.cpp b/05_threadpool/modulename.cpp index c76761f..cf49c1f 100644 --- a/05_threadpool/modulename.cpp +++ b/05_threadpool/modulename.cpp @@ -54,7 +54,8 @@ Handle Async(const Arguments& args) { // Schedule our work request with libuv. Here you can specify the functions // that should be executed in the threadpool and back in the main thread // after the threadpool function completed. - int status = uv_queue_work(uv_default_loop(), req, AsyncWork, AsyncAfter); + int status = uv_queue_work(uv_default_loop(), req, AsyncWork, + (uv_after_work_cb)AsyncAfter); assert(status == 0); return Undefined(); diff --git a/xx_benchmark/modulename.cpp b/xx_benchmark/modulename.cpp index 7b2bb95..253344c 100644 --- a/xx_benchmark/modulename.cpp +++ b/xx_benchmark/modulename.cpp @@ -56,7 +56,8 @@ Handle Fn3(const Arguments& args) { baton->request.data = baton; Local callback = Local::Cast(args[0]); baton->callback = Persistent::New(callback); - uv_queue_work(uv_default_loop(), &baton->request, Fn3Work, Fn3After); + uv_queue_work(uv_default_loop(), &baton->request, Fn3Work, + (uv_after_work_cb)Fn3After); return Undefined(); }