I am writing asynchronous module, but I can not pass an array structure. Please help. That's the error appears. How to avoid it? error C2440: '=' : cannot convert from 'v8::Handle' to 'v8::Array *'
struct Async {
Handle<v8::Array> result;
}
void wmiWorker(uv_work_t* req) {
Async* request = (Async*)req->data;
*(request->result) = getArray(1);
}
Handle<Array> getArray(int x) {
HandleScope handle_scope;
Handle<Array> array = Array::New(3);
if (array.IsEmpty())
return Handle<Array>();
array->Set(0, Integer::New(x));
return handle_scope.Close(array);
}