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

Unified Diff: runtime/include/dart_api.h

Issue 263823004: Add Dart_IdentityHash to the embedding API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: doc Created 6 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
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 5648eb60ab981addcdf3003878016d14d400ca1e..77da50cc79b2f91f9bea4f08c78ec1f51f59f56c 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -391,6 +391,17 @@ DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object);
DART_EXPORT bool Dart_IdentityEquals(Dart_Handle obj1, Dart_Handle obj2);
/**
+ * Returns a hash code for the argument. The hash code of objects that are equal
+ * according to Dart_IdentityEquals will return the same hash code, but the hash
+ * codes of non-equal objects are not necessarily distinct.
+ *
+ * \param obj An object for which to derive a hash code.
+ *
+ * \return A hash code for the parameter.
+ */
+DART_EXPORT uint64_t Dart_IdentityHash(Dart_Handle obj);
+
+/**
* Allocates a handle in the current scope from a persistent handle.
*/
DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object);
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698