mirror of
https://github.com/json-iterator/go.git
synced 2025-06-06 22:36:25 +02:00
fix issue on 32bit platform
This commit is contained in:
parent
da7ed7809b
commit
17cbb770f0
@ -28,7 +28,7 @@ func (iter *Iterator) ReadObject() (ret string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (iter *Iterator) readFieldHash() int32 {
|
func (iter *Iterator) readFieldHash() int32 {
|
||||||
hash := 0x811c9dc5
|
hash := int64(0x811c9dc5)
|
||||||
c := iter.nextToken()
|
c := iter.nextToken()
|
||||||
if c == '"' {
|
if c == '"' {
|
||||||
for {
|
for {
|
||||||
@ -57,7 +57,7 @@ func (iter *Iterator) readFieldHash() int32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func calcHash(str string) int32 {
|
func calcHash(str string) int32 {
|
||||||
hash := 0x811c9dc5
|
hash := int64(0x811c9dc5)
|
||||||
for _, b := range str {
|
for _, b := range str {
|
||||||
hash ^= int(b)
|
hash ^= int(b)
|
||||||
hash *= 0x1000193
|
hash *= 0x1000193
|
||||||
|
Loading…
x
Reference in New Issue
Block a user