1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-24 23:16:47 +02:00

#68 number to string

This commit is contained in:
Tao Wen
2017-06-20 15:11:01 +08:00
parent 8f6a840c63
commit 818ae1331a
19 changed files with 387 additions and 325 deletions

View File

@ -56,7 +56,7 @@ func (iter *Iterator) ReadBigInt() (ret *big.Int) {
var success bool
ret, success = ret.SetString(str, 10)
if !success {
iter.reportError("ReadBigInt", "invalid big int")
iter.ReportError("ReadBigInt", "invalid big int")
return nil
}
return ret
@ -147,7 +147,7 @@ load_loop:
return
}
if len(str) == 0 {
iter.reportError("readNumberAsString", "invalid number")
iter.ReportError("readNumberAsString", "invalid number")
}
return *(*string)(unsafe.Pointer(&str))
}