Skip to content

Commit

Permalink
[cgo] refs skycoin#105 - Added datatype `SKY_params_Distribution_GetM…
Browse files Browse the repository at this point in the history
…ainNetDistribution`
  • Loading branch information
Maykel Arias Torres committed Aug 11, 2019
1 parent ae326d4 commit 3abeb0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added datatype `SKY_params_Distribution_AddressesDecoded`
- Added datatype `SKY_params_Distribution_UnlockedAddressesDecoded`
- Added datatype `SKY_params_Distribution_LockedAddressesDecoded`
- Added datatype `SKY_params_Distribution_GetMainNetDistribution`

### Removed

Expand Down
14 changes: 14 additions & 0 deletions lib/cgo/params.distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package main
import (
"reflect"
"unsafe"

"github.com/skycoin/skycoin/src/params"
)

/*
Expand Down Expand Up @@ -218,3 +220,15 @@ func SKY_params_Distribution_LockedAddressesDecoded(_d C.Distribution__Handle, _
copyToGoSlice(reflect.ValueOf(arg0), _arg0)
return
}

//export SKY_params_Distribution_GetMainNetDistribution
func SKY_params_Distribution_GetMainNetDistribution(_d *C.Distribution__Handle) (____error_code uint32) {
d, ok := lookupDistributionHandle(*_d)
if !ok {
____error_code = SKY_BAD_HANDLE
return
}
*d = params.MainNetDistribution
*_d = registerDistributionHandle(d)
return
}

0 comments on commit 3abeb0d

Please sign in to comment.