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

Unified Diff: runtime/vm/globals.h

Issue 8604007: Add macros for specifying 64-bit integer literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/globals.h
diff --git a/runtime/vm/globals.h b/runtime/vm/globals.h
index 633e51c968d75dead56c9703ddb75c753cb4f9bd..450cfec6de117b89ab9bb7a27e3bb8c1316e2690 100644
--- a/runtime/vm/globals.h
+++ b/runtime/vm/globals.h
@@ -125,6 +125,16 @@ namespace dart {
#endif // !defined(PRIxPTR) && defined(TARGET_OS_WINDOWS)
+// Suffixes for 64-bit integer literals.
+#ifdef _MSC_VER
+#define DART_INT64_C(x) x##I64
+#define DART_UINT64_C(x) x##UI64
+#else
+#define DART_INT64_C(x) x##LL
+#define DART_UINT64_C(x) x##ULL
+#endif
+
+
// The following macro works on both 32 and 64-bit platforms.
// Usage: instead of writing 0x1234567890123456
// write DART_2PART_UINT64_C(0x12345678,90123456);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698