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

Unified Diff: net/base/int128.cc

Issue 11299023: Add real support for uint128. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One more try Created 8 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 | « net/base/int128.h ('k') | net/base/int128_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/int128.cc
diff --git a/net/base/int128.cc b/net/base/int128.cc
new file mode 100644
index 0000000000000000000000000000000000000000..745d8ed6e0c3fc445669e0a0a2dfed356fbc6e57
--- /dev/null
+++ b/net/base/int128.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <iostream>
+#include "base/basictypes.h"
+#include "net/base/int128.h"
+
+const uint128_pod kuint128max = {
+ static_cast<uint64>(GG_LONGLONG(0xFFFFFFFFFFFFFFFF)),
+ static_cast<uint64>(GG_LONGLONG(0xFFFFFFFFFFFFFFFF))
+};
+
+std::ostream& operator<<(std::ostream& o, const uint128& b) {
+ return (o << b.hi_ << "::" << b.lo_);
+}
« no previous file with comments | « net/base/int128.h ('k') | net/base/int128_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698