mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 15:30:56 +01:00
Ugly fix for clang
This commit is contained in:
parent
f23eb282c0
commit
5dd08c6c71
@ -794,13 +794,16 @@ Handle<Value> FromConstructorTemplate(Persistent<FunctionTemplate>& t,
|
||||
HandleScope scope;
|
||||
|
||||
const int argc = args.Length();
|
||||
Local<Value> argv[argc];
|
||||
Local<Value>* argv = new Local<Value>[argc];
|
||||
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
argv[i] = args[i];
|
||||
}
|
||||
|
||||
Local<Object> instance = t->GetFunction()->NewInstance(argc, argv);
|
||||
|
||||
delete[] argv;
|
||||
|
||||
return scope.Close(instance);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user