Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
golang-github-philio-gomysql.6992
strconv.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File strconv.patch of Package golang-github-philio-gomysql.6992
Index: GoMySQL-0.0.0+git20110531.e621cd9/convert.go =================================================================== --- GoMySQL-0.0.0+git20110531.e621cd9.orig/convert.go +++ GoMySQL-0.0.0+git20110531.e621cd9/convert.go @@ -229,7 +229,7 @@ func atoui64(i interface{}) (n uint64) { return t case string: // Convert to int64 first for signing bit - in, err := strconv.Atoi64(t) + in, err := strconv.ParseInt(t,10,64) if err != nil { panic("Invalid string for integer conversion") } @@ -249,7 +249,7 @@ func atof64(i interface{}) (f float64) { return t case string: var err error - f, err = strconv.Atof64(t) + f, err = strconv.ParseFloat(t,64) if err != nil { panic("Invalid string for floating point conversion") } @@ -263,13 +263,13 @@ func atof64(i interface{}) (f float64) { func atos(i interface{}) (s string) { switch t := i.(type) { case int64: - s = strconv.Itoa64(t) + s = strconv.FormatInt(t,10) case uint64: - s = strconv.Uitoa64(t) + s = strconv.FormatUint(t,10) case float32: - s = strconv.Ftoa32(t, 'f', -1) + s = strconv.FormatFloat(float64(t), 'f', -1, 32) case float64: - s = strconv.Ftoa64(t, 'f', -1) + s = strconv.FormatFloat(t, 'f', -1, 64) case []byte: s = string(t) case Date: Index: GoMySQL-0.0.0+git20110531.e621cd9/handler.go =================================================================== --- GoMySQL-0.0.0+git20110531.e621cd9.orig/handler.go +++ GoMySQL-0.0.0+git20110531.e621cd9/handler.go @@ -132,16 +132,16 @@ func handleRow(p *packetRowData, c *Clie // Signed/unsigned ints case FIELD_TYPE_TINY, FIELD_TYPE_SHORT, FIELD_TYPE_YEAR, FIELD_TYPE_INT24, FIELD_TYPE_LONG, FIELD_TYPE_LONGLONG: if f.Flags&FLAG_UNSIGNED > 0 { - field, err = strconv.Atoui64(string(p.row[i].([]byte))) + field, err = strconv.ParseUint(string(p.row[i].([]byte)),10,64) } else { - field, err = strconv.Atoi64(string(p.row[i].([]byte))) + field, err = strconv.ParseInt(string(p.row[i].([]byte)),10,64) } if err != nil { return } // Floats and doubles case FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE: - field, err = strconv.Atof64(string(p.row[i].([]byte))) + field, err = strconv.ParseFloat(string(p.row[i].([]byte)),64) if err != nil { return }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor