forked from fibercrypto/libfibercrypto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cgo] refs fibercrypto#5 Added
coin.mocks.StringAddress
- Loading branch information
Maykel Arias Torres
committed
Mar 24, 2020
1 parent
2355e4b
commit 4741786
Showing
4 changed files
with
95 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
package main | ||
|
||
import ( | ||
"reflect" | ||
"unsafe" | ||
) | ||
|
||
/* | ||
#include <string.h> | ||
#include <stdlib.h> | ||
#include "fctypes.h" | ||
*/ | ||
import "C" | ||
|
||
//export FC_mocks_StringAddress_GetCoinType | ||
func FC_mocks_StringAddress_GetCoinType(__m *C.StringAddressMocks__Handle, _arg0 *C.GoSlice_) (____error_code uint32) { | ||
_m, ok_m := lookupStringAddressMocksHandle(*__m) | ||
if !ok_m { | ||
____error_code = FC_BAD_HANDLE | ||
return | ||
} | ||
__arg0 := _m.GetCoinType() | ||
copyToGoSlice(reflect.ValueOf(__arg0), _arg0) | ||
return | ||
} | ||
|
||
//export FC_mocks_StringAddress_GetValue | ||
func FC_mocks_StringAddress_GetValue(__m *C.StringAddressMocks__Handle, _arg0 *C.GoSlice_) (____error_code uint32) { | ||
_m, ok_m := lookupStringAddressMocksHandle(*__m) | ||
if !ok_m { | ||
____error_code = FC_BAD_HANDLE | ||
return | ||
} | ||
__arg0 := _m.GetValue() | ||
copyToGoSlice(reflect.ValueOf(__arg0), _arg0) | ||
return | ||
} | ||
|
||
//export FC_mocks_StringAddress_IsValid | ||
func FC_mocks_StringAddress_IsValid(__m *C.StringAddressMocks__Handle, _arg0 *bool) (____error_code uint32) { | ||
_m, ok_m := lookupStringAddressMocksHandle(*__m) | ||
if !ok_m { | ||
____error_code = FC_BAD_HANDLE | ||
return | ||
} | ||
__arg0 := _m.IsValid() | ||
*_arg0 = __arg0 | ||
return | ||
} | ||
|
||
//export FC_mocks_StringAddress_SetCoinType | ||
func FC_mocks_StringAddress_SetCoinType(__m *C.StringAddressMocks__Handle, _val []byte) (____error_code uint32) { | ||
_m, ok_m := lookupStringAddressMocksHandle(*__m) | ||
if !ok_m { | ||
____error_code = FC_BAD_HANDLE | ||
return | ||
} | ||
val := *(*[]byte)(unsafe.Pointer(&_val)) | ||
_m.SetCoinType(val) | ||
return | ||
} | ||
|
||
//export FC_mocks_StringAddress_SetValue | ||
func FC_mocks_StringAddress_SetValue(__m *C.StringAddressMocks__Handle, _val []byte) (____error_code uint32) { | ||
_m, ok_m := lookupStringAddressMocksHandle(*__m) | ||
if !ok_m { | ||
____error_code = FC_BAD_HANDLE | ||
return | ||
} | ||
val := *(*[]byte)(unsafe.Pointer(&_val)) | ||
_m.SetValue(val) | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters