| Index: runtime/include/dart_api.h
|
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
|
| index 3cc6fb5ea0ef0eb286a367088c1d494e35155959..6fe83feb160e8ff5f68638c10dc0f0bced481dd5 100755
|
| --- a/runtime/include/dart_api.h
|
| +++ b/runtime/include/dart_api.h
|
| @@ -1477,7 +1477,7 @@ DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str,
|
| /**
|
| * 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
|
| @@ -2106,6 +2106,32 @@ typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name,
|
| /* TODO(turnidge): Consider renaming to NativeFunctionResolver or
|
| * NativeResolver. */
|
|
|
| +/*
|
| + * ===========
|
| + * Environment
|
| + * ===========
|
| + */
|
| +
|
| +/**
|
| + * An environment lookup callback function.
|
| + *
|
| + * \param name The name of the value to lookup in the environment.
|
| + *
|
| + * \return A valid handle to a string if the name exists in the
|
| + * current environment or Dart_Null() if not.
|
| + */
|
| +typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_Handle name);
|
| +
|
| +/**
|
| + * Sets the environment callback for the current isolate. This
|
| + * callback is used to lookup environment values by name in the
|
| + * current environment. This enables the embedder to supply values for
|
| + * the const constructors bool.fromEnvironment, int.fromEnvironment
|
| + * and String.fromEnvironment.
|
| + */
|
| +DART_EXPORT Dart_Handle Dart_SetEnvironmentCallback(
|
| + Dart_EnvironmentCallback callback);
|
| +
|
| /**
|
| * Sets the callback used to resolve native functions for a library.
|
| *
|
|
|