Chromium Code Reviews| Index: runtime/include/dart_api.h |
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
| index 7aded5027f53762f4a97d5039e2c0becbd363390..ddb70c73242f58dc94873152c7855c47d0cd3ce2 100755 |
| --- a/runtime/include/dart_api.h |
| +++ b/runtime/include/dart_api.h |
| @@ -1315,6 +1315,7 @@ DART_EXPORT bool Dart_IsString(Dart_Handle object); |
| DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ |
| DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); |
| DART_EXPORT bool Dart_IsList(Dart_Handle object); |
| +DART_EXPORT bool Dart_IsMap(Dart_Handle object); |
| DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); |
| DART_EXPORT bool Dart_IsType(Dart_Handle handle); |
| DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); |
| @@ -1766,7 +1767,7 @@ DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* length); |
| * \param list A List. |
| * \param index A valid index into the List. |
| * |
| - * \return The Object in the List at the specified index if no errors |
| + * \return The Object in the List at the specified index if no error |
| * occurs. Otherwise returns an error handle. |
| */ |
| DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, |
| @@ -1807,6 +1808,50 @@ DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, |
| /* |
| + * ==== |
| + * Maps |
| + * ==== |
| + */ |
| + |
| +/** |
| + * Gets the Object at some key of a Map. |
| + * |
| + * May generate an unhandled exception error. |
| + * |
| + * \param map A Map. |
| + * \param key An Object. |
| + * |
| + * \return The Object in the Map at the specified key if no error occurs. |
|
koda
2014/05/22 23:40:24
Mention that null is returned if the map does not
rmacnak
2014/05/30 17:23:33
Done.
|
| + * Otherwise returns an error handle. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key); |
| + |
| +/** |
| + * Returns whether the Map contains a given key. |
| + * |
| + * May generate an unhandled exception error. |
| + * |
| + * \param map A Map. |
| + * |
| + * \return A handle on a boolean indicating whether map contains the key. |
| + * Otherwise returns an error handle. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key); |
| + |
| +/** |
| + * Gets the list of keys of a Map. |
| + * |
| + * May generate an unhandled exception error. |
| + * |
| + * \param map A Map. |
| + * |
| + * \return The list of key Objects if no error occurs. Otherwise returns an |
| + * error handle. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map); |
| + |
| + |
| +/* |
| * ========== |
| * Typed Data |
| * ========== |