Skip to content

Commit

Permalink
[cgo] refs fibercrypto#116 Finalized cli.generate_addrs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Jan 18, 2020
1 parent 6c0d131 commit 7691494
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions lib/cgo/cli.generate_addrs.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,21 @@ import (
#include <stdlib.h>
#include "skytypes.h"
#include "skyfee.h"
*/
import "C"

//export SKY_cli_GenerateAddressesInFile
func SKY_cli_GenerateAddressesInFile(_walletFile string, _num uint64, pwd C.PasswordReader__Handle, _arg3 *C.GoSlice_) (____error_code uint32) {
func SKY_cli_GenerateAddressesInFile(_walletFile string, _num uint64, _pr *C.PasswordReader__Handle, _arg3 *C.GoSlice_) (____error_code uint32) {
walletFile := _walletFile
num := _num
pr, okc := lookupPasswordReaderHandle(pwd)
if !okc {
__pr, okpr := lookupPasswordReaderHandle(*_pr)
if !okpr {
____error_code = SKY_BAD_HANDLE
return
}
__arg3, ____return_err := cli.GenerateAddressesInFile(walletFile, num, *pr)
pr := *__pr
__arg3, ____return_err := cli.GenerateAddressesInFile(walletFile, num, pr)
____error_code = libErrorCode(____return_err)
if ____return_err == nil {
copyToGoSlice(reflect.ValueOf(__arg3), _arg3)
Expand All @@ -35,31 +37,28 @@ func SKY_cli_GenerateAddressesInFile(_walletFile string, _num uint64, pwd C.Pass
}

//export SKY_cli_FormatAddressesAsJSON
func SKY_cli_FormatAddressesAsJSON(_addrs []C.cipher__Address, _arg1 *string) (____error_code uint32) {
addrs := *(*[]cipher.Address)(unsafe.Pointer(&_addrs))
__addrs := toAddresserArray(addrs)
__arg1, ____return_err := cli.FormatAddressesAsJSON(__addrs)
func SKY_cli_FormatAddressesAsJSON(_addrs []C.cipher__Addresser, _arg1 *C.GoString_) (____error_code uint32) {
addrs := *(*[]cipher.Addresser)(unsafe.Pointer(&_addrs))
__arg1, ____return_err := cli.FormatAddressesAsJSON(addrs)
____error_code = libErrorCode(____return_err)
if ____return_err == nil {
*_arg1 = __arg1
copyString(__arg1, _arg1)
}
return
}

//export SKY_cli_FormatAddressesAsJoinedArray
func SKY_cli_FormatAddressesAsJoinedArray(_addrs []C.cipher__Address, _arg1 *string) (____error_code uint32) {
addrs := *(*[]cipher.Address)(unsafe.Pointer(&_addrs))
__addrs := toAddresserArray(addrs)
__arg1 := cli.FormatAddressesAsJoinedArray(__addrs)
*_arg1 = __arg1
func SKY_cli_FormatAddressesAsJoinedArray(_addrs []C.cipher__Addresser, _arg1 *C.GoString_) (____error_code uint32) {
addrs := *(*[]cipher.Addresser)(unsafe.Pointer(&_addrs))
__arg1 := cli.FormatAddressesAsJoinedArray(addrs)
copyString(__arg1, _arg1)
return
}

//export SKY_cli_AddressesToStrings
func SKY_cli_AddressesToStrings(_addrs []C.cipher__Address, _arg1 *[]string) (____error_code uint32) {
addrs := *(*[]cipher.Address)(unsafe.Pointer(&_addrs))
__addrs := toAddresserArray(addrs)
*_arg1 = cli.AddressesToStrings(__addrs)

func SKY_cli_AddressesToStrings(_addrs []C.cipher__Addresser, _arg1 *C.GoSlice_) (____error_code uint32) {
addrs := *(*[]cipher.Addresser)(unsafe.Pointer(&_addrs))
__arg1 := cli.AddressesToStrings(addrs)
copyToGoSlice(reflect.ValueOf(__arg1), _arg1)
return
}

0 comments on commit 7691494

Please sign in to comment.