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

Unified Diff: third_party/ijar/common.h

Issue 1901473003: 🐞 Update version of third_party/ijar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « third_party/ijar/classfile.cc ('k') | third_party/ijar/ijar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/ijar/common.h
diff --git a/third_party/ijar/common.h b/third_party/ijar/common.h
index 118041b85296a85fffd37b18e4509513855cc52e..513e0019a9d7997d8612c1dff2b6a4c182645606 100644
--- a/third_party/ijar/common.h
+++ b/third_party/ijar/common.h
@@ -1,6 +1,4 @@
-// Copyright 2001,2007 Alan Donovan. All rights reserved.
-//
-// Author: Alan Donovan <adonovan@google.com>
+// Copyright 2015 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -61,6 +59,13 @@ inline u4 get_u4le(const u1 *&p) {
return x;
}
+inline u8 get_u8le(const u1 *&p) {
+ u4 lo = get_u4le(p);
+ u4 hi = get_u4le(p);
+ u8 x = ((u8)hi << 32) | lo;
+ return x;
+}
+
inline void put_u1(u1 *&p, u1 x) {
*p++ = x;
}
@@ -89,6 +94,11 @@ inline void put_u4le(u1 *&p, u4 x) {
*p++ = x >> 24;
}
+inline void put_u8le(u1 *&p, u8 x) {
+ put_u4le(p, x & 0xffffffff);
+ put_u4le(p, (x >> 32) & 0xffffffff);
+}
+
// Copy n bytes from src to p, and advance p.
inline void put_n(u1 *&p, const u1 *src, size_t n) {
memcpy(p, src, n);
« no previous file with comments | « third_party/ijar/classfile.cc ('k') | third_party/ijar/ijar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698