src: fix windows build breakage from f674b09
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 9 Aug 2013 15:43:10 +0000 (17:43 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 9 Aug 2013 16:56:46 +0000 (18:56 +0200)
The TWO_BYTE_BUFFER macro never made it into the final version of
the patch that got landed in commit f674b09.

src/node.cc

index 8c1653a..a1e3fea 100644 (file)
@@ -2151,7 +2151,12 @@ static void EnvEnumerator(const PropertyCallbackInfo<Array>& info) {
       s = p + wcslen(p);
     }
     const uint16_t* two_byte_buffer = reinterpret_cast<const uint16_t*>(p);
-    env->Set(i++, TWO_BYTE_STRING(node_isolate, two_byte_buffer, s - p));
+    const size_t two_byte_buffer_len = s - p;
+    Local<String> value = String::NewFromTwoByte(node_isolate,
+                                                 two_byte_buffer,
+                                                 String::kNormalString,
+                                                 two_byte_buffer_len);
+    env->Set(i++, value);
     p = s + wcslen(s) + 1;
   }
   FreeEnvironmentStringsW(environment);