Skip to content

Commit

Permalink
[cgo][SWIG] refs fibercrypto#105 Added export multireturn GoUint32
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Oct 1, 2019
1 parent c913831 commit 8431ff1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/cgo/cipher.bip32.bip32.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func SKY_bip32_PrivateKey_ChildNumber(_pk C.PrivateKey__Handle, _arg0 *uint32) (
return
}

*_arg0 = pk.ChildNumber()
*_arg0 = uint32(pk.ChildNumber())
return
}

Expand All @@ -331,7 +331,7 @@ func SKY_bip32_PublicKey_ChildNumber(_pk C.PublicKey__Handle, _arg0 *uint32) (__
return
}

*_arg0 = pk.ChildNumber()
*_arg0 = uint32(pk.ChildNumber())
return
}

Expand Down
13 changes: 12 additions & 1 deletion lib/swig/dynamic/golang.cgo.i
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,18 @@

/*GoUint64* as function return typemap*/
%typemap(argout) GoUint64* {
%append_output( SWIG_From_long( *$1 ) );
%append_output( SWIG_From_unsigned_SS_long_SS_long( *$1 ) );
}

/*GoUint32* parameter as reference */
%typemap(in, numinputs=0) GoUint32* (GoUint32 temp) {
temp = 0;
$1 = &temp;
}

/*GoUint32* as function return typemap*/
%typemap(argout) GoUint32* {
%append_output( SWIG_From_unsigned_SS_int( *$1 ) );
}

/*GoInt64* parameter as reference */
Expand Down

0 comments on commit 8431ff1

Please sign in to comment.