summaryrefslogtreecommitdiff
path: root/misc/cgo/gmp/gmp.go
diff options
context:
space:
mode:
Diffstat (limited to 'misc/cgo/gmp/gmp.go')
-rw-r--r--misc/cgo/gmp/gmp.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/misc/cgo/gmp/gmp.go b/misc/cgo/gmp/gmp.go
index 7faa71b69..3dbc022ce 100644
--- a/misc/cgo/gmp/gmp.go
+++ b/misc/cgo/gmp/gmp.go
@@ -211,7 +211,6 @@ func (z *Int) destroy() {
z.init = false
}
-
/*
* arithmetic
*/
@@ -266,7 +265,7 @@ func (z *Int) Mod(x, y *Int) *Int {
func (z *Int) Lsh(x *Int, s uint) *Int {
x.doinit()
z.doinit()
- C.mpz_mul_2exp(&z.i[0], &x.i[0], C.ulong(s))
+ C.mpz_mul_2exp(&z.i[0], &x.i[0], C.mp_bitcnt_t(s))
return z
}
@@ -274,7 +273,7 @@ func (z *Int) Lsh(x *Int, s uint) *Int {
func (z *Int) Rsh(x *Int, s uint) *Int {
x.doinit()
z.doinit()
- C.mpz_div_2exp(&z.i[0], &x.i[0], C.ulong(s))
+ C.mpz_div_2exp(&z.i[0], &x.i[0], C.mp_bitcnt_t(s))
return z
}
@@ -300,7 +299,6 @@ func (z *Int) Int64() int64 {
return int64(C.mpz_get_si(&z.i[0]))
}
-
// Neg sets z = -x and returns z.
func (z *Int) Neg(x *Int) *Int {
x.doinit()
@@ -317,7 +315,6 @@ func (z *Int) Abs(x *Int) *Int {
return z
}
-
/*
* functions without a clear receiver
*/