From 709382e9c1ea35d82f074793d5db89dd8536c283 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Wed, 5 Nov 2014 09:24:08 -0800 Subject: [PATCH] Fix usage on 32bit machines --- match_test.go | 6 +++--- queryparser.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/match_test.go b/match_test.go index c594eb5..4ceaa2a 100644 --- a/match_test.go +++ b/match_test.go @@ -110,7 +110,7 @@ func TestPathSliceStart(t *testing.T) { assertPath(t, "$[123:]", buildPath( - newMatchSliceFn(123, math.MaxInt64, 1), + newMatchSliceFn(123, math.MaxInt32, 1), )) } @@ -134,7 +134,7 @@ func TestPathSliceStartStep(t *testing.T) { assertPath(t, "$[123::7]", buildPath( - newMatchSliceFn(123, math.MaxInt64, 7), + newMatchSliceFn(123, math.MaxInt32, 7), )) } @@ -150,7 +150,7 @@ func TestPathSliceStep(t *testing.T) { assertPath(t, "$[::7]", buildPath( - newMatchSliceFn(0, math.MaxInt64, 7), + newMatchSliceFn(0, math.MaxInt32, 7), )) } diff --git a/queryparser.go b/queryparser.go index be6954f..901790f 100644 --- a/queryparser.go +++ b/queryparser.go @@ -203,7 +203,7 @@ loop: // labeled loop for easy breaking func (p *queryParser) parseSliceExpr() queryParserStateFn { // init slice to grab all elements - start, end, step := 0, math.MaxInt64, 1 + start, end, step := 0, math.MaxInt32, 1 // parse optional start tok := p.getToken()