我正在编写异步模块,但我无法传递数组结构。请帮忙。那就是出现的错误。如何避免?错误 C2440:“=”:无法从“v8::Handle”转换为“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);
}