]> Cypherpunks repositories - gostls13.git/commitdiff
gmp: fix bug in SetString
authorRuss Cox <rsc@golang.org>
Sat, 1 May 2010 20:10:01 +0000 (13:10 -0700)
committerRuss Cox <rsc@golang.org>
Sat, 1 May 2010 20:10:01 +0000 (13:10 -0700)
R=adg
CC=golang-dev
https://golang.org/cl/1004045

misc/cgo/gmp/gmp.go

index 33c16de773214cdb6920b11bba59721d81afc61d..f7bbe9c5145e61b70bdf6bbf3bda1f32d3d4a899 100644 (file)
@@ -190,7 +190,7 @@ func (z *Int) SetString(s string, base int) os.Error {
        if C.mpz_set_str(&z.i[0], p, C.int(base)) < 0 {
                return os.EINVAL
        }
-       return z
+       return nil
 }
 
 // String returns the decimal representation of z.