aboutsummaryrefslogtreecommitdiffstats
path: root/go/bls/mcl.go
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2017-12-24 15:31:55 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2017-12-24 15:31:55 +0800
commit57f11a58546030a108ae185fb9079e1b29f1d032 (patch)
tree514c9486cf7971b14e62950b2bb07c36cc878f2c /go/bls/mcl.go
parent8c7256c6becf7b3e3249cd280c3ec00bf464c2d1 (diff)
downloaddexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar.gz
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar.bz2
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar.lz
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar.xz
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.tar.zst
dexon-bls-57f11a58546030a108ae185fb9079e1b29f1d032.zip
remove old deserialize apinew_deserialize_api
Diffstat (limited to 'go/bls/mcl.go')
-rw-r--r--go/bls/mcl.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/go/bls/mcl.go b/go/bls/mcl.go
index afb57b8..504fc7c 100644
--- a/go/bls/mcl.go
+++ b/go/bls/mcl.go
@@ -91,7 +91,7 @@ func (x *Fr) SetString(s string, base int) error {
func (x *Fr) Deserialize(buf []byte) error {
// #nosec
err := C.mclBnFr_deserialize(x.getPointer(), unsafe.Pointer(&buf[0]), C.size_t(len(buf)))
- if err != 0 {
+ if err == 0 {
return fmt.Errorf("err mclBnFr_deserialize %x", buf)
}
return nil
@@ -220,7 +220,7 @@ func (x *G1) SetString(s string, base int) error {
func (x *G1) Deserialize(buf []byte) error {
// #nosec
err := C.mclBnG1_deserialize(x.getPointer(), unsafe.Pointer(&buf[0]), C.size_t(len(buf)))
- if err != 0 {
+ if err == 0 {
return fmt.Errorf("err mclBnG1_deserialize %x", buf)
}
return nil
@@ -330,7 +330,7 @@ func (x *G2) SetString(s string, base int) error {
func (x *G2) Deserialize(buf []byte) error {
// #nosec
err := C.mclBnG2_deserialize(x.getPointer(), unsafe.Pointer(&buf[0]), C.size_t(len(buf)))
- if err != 0 {
+ if err == 0 {
return fmt.Errorf("err mclBnG2_deserialize %x", buf)
}
return nil
@@ -441,7 +441,7 @@ func (x *GT) SetString(s string, base int) error {
func (x *GT) Deserialize(buf []byte) error {
// #nosec
err := C.mclBnGT_deserialize(x.getPointer(), unsafe.Pointer(&buf[0]), C.size_t(len(buf)))
- if err != 0 {
+ if err == 0 {
return fmt.Errorf("err mclBnGT_deserialize %x", buf)
}
return nil