Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: runtime/bin/platform.h

Issue 10112002: Add read-only environment variable access. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add windows error handling. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/bin/platform.h
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index a3c44b6046d013a0d9d2e0b14487f01e794f03e1..233740ecb3b3a0bb8a65924a1a7083f0986a3ed3 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -25,7 +25,13 @@ class Platform {
static char* StrError(int error_code);
// Extracts the local hostname.
- static bool LocalHostname(char *buffer, intptr_t buffer_length);
+ static bool LocalHostname(char* buffer, intptr_t buffer_length);
+
+ // Extracts the environment variables for the current process.
+ // The array of strings returned must be deallocated using
+ // delete[]. The number of elements in the array is returned
+ // in the count argument.
+ static char** Environment(intptr_t* count);
private:
DISALLOW_ALLOCATION();

Powered by Google App Engine
This is Rietveld 408576698