From 5dd08c6c71cf132c3ee538378bce1956e2854ac6 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 9 Oct 2010 14:21:26 -0700 Subject: [PATCH] Ugly fix for clang --- src/node.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 7a76fbd..5fbdba8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -794,13 +794,16 @@ Handle FromConstructorTemplate(Persistent& t, HandleScope scope; const int argc = args.Length(); - Local argv[argc]; + Local* argv = new Local[argc]; for (int i = 0; i < argc; ++i) { argv[i] = args[i]; } Local instance = t->GetFunction()->NewInstance(argc, argv); + + delete[] argv; + return scope.Close(instance); } -- 2.7.4