Skip to content

Commit

Permalink
[cgo] refs fibercrypto#116 FInalized cli.outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Jan 18, 2020
1 parent d71e80e commit aa9ccf7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
3 changes: 3 additions & 0 deletions include/cli.outputs.go.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
typedef struct{
readable__UnspentOutputsSummary Outputs;
} cli__OutputsResult;
29 changes: 14 additions & 15 deletions lib/cgo/cli.outputs.go
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
package main

import (
cli "github.com/SkycoinProject/skycoin/src/cli"
)
import cli "github.com/SkycoinProject/skycoin/src/cli"

/*
#include <string.h>
#include <stdlib.h>
#include "skytypes.h"
#include "skyfee.h"
*/
import "C"

//export SKY_cli_GetWalletOutputsFromFile
func SKY_cli_GetWalletOutputsFromFile(_c C.GetOutputser__Handle, _walletFile string, _arg2 *C.ReadableUnspentOutputsSummary_Handle) (____error_code uint32) {
c, okc := lookupGetOutputserHandle(_c)
func SKY_cli_GetWalletOutputsFromFile(_c *C.GetOutputser__Handle, _walletFile string, _arg2 *C.UnspentOutputsSummary__Handle) (____error_code uint32) {
__c, okc := lookupGetOutputserHandle(*_c)
if !okc {
____error_code = SKY_BAD_HANDLE
return
}
c := *__c
walletFile := _walletFile

ru, ____return_err := cli.GetWalletOutputsFromFile(*c, walletFile)
__arg2, ____return_err := cli.GetWalletOutputsFromFile(c, walletFile)
____error_code = libErrorCode(____return_err)
if ____return_err == nil {

*_arg2 = registerReadableUnspentOutputsSummaryHandle(ru)

*_arg2 = registerUnspentOutputsSummaryHandle(__arg2)
}
return
}

//export SKY_cli_GetWalletOutputs
func SKY_cli_GetWalletOutputs(_c C.GetOutputser__Handle, _wlt *C.Wallet__Handle, _arg2 *C.ReadableUnspentOutputsSummary_Handle) (____error_code uint32) {
c, okc := lookupGetOutputserHandle(_c)
func SKY_cli_GetWalletOutputs(_c *C.GetOutputser__Handle, _wlt *C.Wallet__Handle, _arg2 *C.UnspentOutputsSummary__Handle) (____error_code uint32) {
__c, okc := lookupGetOutputserHandle(*_c)
if !okc {
____error_code = SKY_BAD_HANDLE
return
}
wlt, okwlt := lookupWalletHandle(*_wlt)
c := *__c
__wlt, okwlt := lookupWalletHandle(*_wlt)
if !okwlt {
____error_code = SKY_BAD_HANDLE
return
}
__arg2, ____return_err := cli.GetWalletOutputs(*c, *wlt)
wlt := *__wlt
__arg2, ____return_err := cli.GetWalletOutputs(c, wlt)
____error_code = libErrorCode(____return_err)
if ____return_err == nil {
*_arg2 = registerReadableUnspentOutputsSummaryHandle(__arg2)
*_arg2 = registerUnspentOutputsSummaryHandle(__arg2)
}
return
}

0 comments on commit aa9ccf7

Please sign in to comment.