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

Unified Diff: runtime/include/dart_api.h

Issue 8585049: Add an interface for retrieving the value of unsigned 64-bit integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor consistency changes. Created 9 years 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/dartutils.cc ('k') | runtime/vm/bigint_operations.h » ('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 ce339311a1e16332fdf28697bbe69361508fefa5..c6ad2224b5cf0803616f65d707201490a441b7c1 100755
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -631,6 +631,17 @@ DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer,
bool* fits);
/**
+ * Does this Integer fit into a 64-bit unsigned integer?
+ *
+ * \param integer An integer.
+ * \param fits Returns true if the integer fits into a 64-bit unsigned integer.
+ *
+ * \return A valid handle if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_IntegerFitsIntoUint64(Dart_Handle integer,
+ bool* fits);
+
+/**
* Returns an Integer with the provided value.
*
* \param value The value of the integer.
@@ -661,7 +672,22 @@ DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* value);
*
* \return A valid handle if no error occurs during the operation.
*/
-DART_EXPORT Dart_Handle Dart_IntegerValue(Dart_Handle integer, int64_t* value);
+DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer,
+ int64_t* value);
+
+/**
+ * Gets the value of an Integer.
+ *
+ * The integer must fit into a 64-bit unsigned integer, otherwise an
+ * error occurs.
+ *
+ * \param integer An Integer.
+ * \param value Returns the value of the Integer.
+ *
+ * \return A valid handle if no error occurs during the operation.
+ */
+DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer,
+ uint64_t* value);
/**
* Gets the value of an integer as a hexadecimal C string.
@@ -673,8 +699,8 @@ DART_EXPORT Dart_Handle Dart_IntegerValue(Dart_Handle integer, int64_t* value);
*
* \return A valid handle if no error occurs during the operation.
*/
-DART_EXPORT Dart_Handle Dart_IntegerValueHexCString(Dart_Handle integer,
- const char** value);
+DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer,
+ const char** value);
// --- Booleans ----
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/vm/bigint_operations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698