aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorJosh Wolfe <thejoshwolfe@gmail.com>2015-12-07 08:29:19 -0700
committerJosh Wolfe <thejoshwolfe@gmail.com>2015-12-07 08:29:19 -0700
commitf6eecfe5f486b250de33a8129b1c85198be43280 (patch)
tree2cef7045ade894407c6b6d99e6daa5c86a9a496b /src/util.cpp
parent94e61287e708f61d2a9d814bfe7910d13e067ada (diff)
downloadzig-f6eecfe5f486b250de33a8129b1c85198be43280.tar.gz
zig-f6eecfe5f486b250de33a8129b1c85198be43280.zip
getting started on array types
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 341b1c354b..cb87ab6243 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -19,3 +19,10 @@ void zig_panic(const char *format, ...) {
va_end(ap);
abort();
}
+
+uint32_t int_hash(int i) {
+ return *reinterpret_cast<uint32_t*>(&i);
+}
+bool int_eq(int a, int b) {
+ return a == b;
+}