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

Unified Diff: runtime/include/dart_api.h

Issue 24975002: - Implement a first cut for const String.env in the VM to allow (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/lib/bool.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
===================================================================
--- runtime/include/dart_api.h (revision 28841)
+++ runtime/include/dart_api.h (working copy)
@@ -1476,7 +1476,7 @@
/**
* Gets the data corresponding to the string object. This function returns
* the data only for Latin-1 (ISO-8859-1) string objects. For all other
- * string objects it return and error.
+ * string objects it returns an error.
*
* \param str A string.
* \param latin1_array An array allocated by the caller, used to return
@@ -2120,6 +2120,29 @@
/*
+ * ===========
+ * Environment
+ * ===========
+ */
+
+typedef enum {
+ kStringEnvironment = 0,
+ kIntegerEnvironment,
+ kBoolEnvironment
+} Dart_EnvironmentType;
+
+/* TODO(iposva): Document. */
+typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_EnvironmentType type,
+ Dart_Handle name);
+
+/**
+ * Sets the configuration callback for the current isolate. This callback is
+ * used to lookup configuration values by name in the current environment.
+ */
+DART_EXPORT Dart_Handle Dart_SetEnvironmentCallback(
+ Dart_EnvironmentCallback callback);
+
+/*
* =====================
* Scripts and Libraries
* =====================
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/lib/bool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698