aboutsummaryrefslogtreecommitdiff
path: root/const.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-02-20 09:24:02 -0700
committerBen Johnson <benbjohnson@yahoo.com>2014-02-20 09:24:02 -0700
commita857b45bac55d1e7954994b72126099c5e44c71f (patch)
tree9f1b78c0e7d23c2f8ef6edfad140f10d98f3eec7 /const.go
parentMerge branch 'master' of https://github.com/boltdb/bolt (diff)
downloaddedo-a857b45bac55d1e7954994b72126099c5e44c71f.tar.gz
dedo-a857b45bac55d1e7954994b72126099c5e44c71f.tar.xz
Check for sequence overflow.
Diffstat (limited to 'const.go')
-rw-r--r--const.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/const.go b/const.go
index 9ad7d25..00228be 100644
--- a/const.go
+++ b/const.go
@@ -3,6 +3,13 @@ package bolt
const version = 1
const (
+ maxUint = ^uint(0)
+ minUint = 0
+ maxInt = int(^uint(0) >> 1)
+ minInt = -maxInt - 1
+)
+
+const (
// MaxBucketNameSize is the maximum length of a bucket name, in bytes.
MaxBucketNameSize = 255