0
0
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:
Ryan Dahl 2010-10-09 14:21:26 -07:00
parent f23eb282c0
commit 5dd08c6c71

View File

@ -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);
}