| OLD | NEW | 
|---|
| 1 // Copyright 2009 The RE2 Authors.  All Rights Reserved. | 1 // Copyright 2009 The RE2 Authors.  All Rights Reserved. | 
| 2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style | 
| 3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef RE2_UTIL_UTIL_H__ | 5 #ifndef RE2_UTIL_UTIL_H__ | 
| 6 #define RE2_UTIL_UTIL_H__ | 6 #define RE2_UTIL_UTIL_H__ | 
| 7 | 7 | 
| 8 // C | 8 // C | 
| 9 #include <stdio.h> | 9 #include <stdio.h> | 
| 10 #include <string.h> | 10 #include <string.h> | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 122 } | 122 } | 
| 123 | 123 | 
| 124 static inline uint64 Hash64StringWithSeed(const char* s, int len, uint32 seed) { | 124 static inline uint64 Hash64StringWithSeed(const char* s, int len, uint32 seed) { | 
| 125   uint32 x, y; | 125   uint32 x, y; | 
| 126   x = seed; | 126   x = seed; | 
| 127   y = 0; | 127   y = 0; | 
| 128   hashword2((uint32*)s, len/4, &x, &y); | 128   hashword2((uint32*)s, len/4, &x, &y); | 
| 129   return ((uint64)x << 32) | y; | 129   return ((uint64)x << 32) | y; | 
| 130 } | 130 } | 
| 131 | 131 | 
|  | 132 inline bool RunningOnValgrindOrMemorySanitizer() { | 
|  | 133 #if defined(MEMORY_SANITIZER) | 
|  | 134   return true; | 
|  | 135 #else | 
|  | 136   return RunningOnValgrind(); | 
|  | 137 #endif | 
|  | 138 } | 
|  | 139 | 
| 132 }  // namespace re2 | 140 }  // namespace re2 | 
| 133 | 141 | 
| 134 #include "util/arena.h" | 142 #include "util/arena.h" | 
| 135 #include "util/logging.h" | 143 #include "util/logging.h" | 
| 136 #include "util/mutex.h" | 144 #include "util/mutex.h" | 
| 137 #include "util/utf.h" | 145 #include "util/utf.h" | 
| 138 | 146 | 
| 139 #endif // RE2_UTIL_UTIL_H__ | 147 #endif // RE2_UTIL_UTIL_H__ | 
| OLD | NEW | 
|---|