src: turn two global vars into local vars
authorBen Noordhuis <info@bnoordhuis.nl>
Wed, 12 Nov 2014 14:29:34 +0000 (15:29 +0100)
committerFedor Indutny <fedor@indutny.com>
Tue, 18 Nov 2014 19:55:55 +0000 (22:55 +0300)
Bring us a little closer to multi-isolate readiness by removing two
global variables.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: https://github.com/node-forward/node/pull/58

src/node.cc
src/node_crypto.cc

index 7b4f986..73bc45c 100644 (file)
@@ -1378,7 +1378,7 @@ void AppendExceptionLine(Environment* env,
     err_obj->SetHiddenValue(env->processed_string(), True(env->isolate()));
   }
 
-  static char arrow[1024];
+  char arrow[1024];
 
   // Print (filename):(line number): (message).
   node::Utf8Value filename(message->GetScriptResourceName());
index b119082..bbc2b95 100644 (file)
@@ -3679,7 +3679,7 @@ void PublicKeyCipher::Cipher(const FunctionCallbackInfo<Value>& args) {
 void DiffieHellman::Initialize(Environment* env, Handle<Object> target) {
   Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
 
-  static enum PropertyAttribute attributes =
+  const PropertyAttribute attributes =
       static_cast<PropertyAttribute>(v8::ReadOnly | v8::DontDelete);
 
   t->InstanceTemplate()->SetInternalFieldCount(1);