github.com/F4RD1N/gomobile@v1.0.1/bind/testdata/basictypes.go.golden (about) 1 // Code generated by gobind. DO NOT EDIT. 2 3 // Package main is an autogenerated binder stub for package basictypes. 4 // 5 // autogenerated by gobind -lang=go basictypes 6 package main 7 8 /* 9 #include <stdlib.h> 10 #include <stdint.h> 11 #include "seq.h" 12 #include "basictypes.h" 13 14 */ 15 import "C" 16 17 import ( 18 "basictypes" 19 _seq "github.com/F4RD1N/gomobile/bind/seq" 20 ) 21 22 // suppress the error if seq ends up unused 23 var _ = _seq.FromRefNum 24 25 //export proxybasictypes__Bool 26 func proxybasictypes__Bool(param_p0 C.char) C.char { 27 _param_p0 := param_p0 != 0 28 res_0 := basictypes.Bool(_param_p0) 29 var _res_0 C.char = 0 30 if res_0 { 31 _res_0 = 1 32 } 33 return _res_0 34 } 35 36 //export proxybasictypes__ByteArrays 37 func proxybasictypes__ByteArrays(param_x C.nbyteslice) C.nbyteslice { 38 _param_x := toSlice(param_x, false) 39 res_0 := basictypes.ByteArrays(_param_x) 40 _res_0 := fromSlice(res_0, true) 41 return _res_0 42 } 43 44 //export proxybasictypes__Error 45 func proxybasictypes__Error() C.int32_t { 46 res_0 := basictypes.Error() 47 var _res_0 C.int32_t = _seq.NullRefNum 48 if res_0 != nil { 49 _res_0 = C.int32_t(_seq.ToRefNum(res_0)) 50 } 51 return _res_0 52 } 53 54 //export proxybasictypes__ErrorPair 55 func proxybasictypes__ErrorPair() (C.nint, C.int32_t) { 56 res_0, res_1 := basictypes.ErrorPair() 57 _res_0 := C.nint(res_0) 58 var _res_1 C.int32_t = _seq.NullRefNum 59 if res_1 != nil { 60 _res_1 = C.int32_t(_seq.ToRefNum(res_1)) 61 } 62 return _res_0, _res_1 63 } 64 65 //export proxybasictypes__Ints 66 func proxybasictypes__Ints(param_x C.int8_t, param_y C.int16_t, param_z C.int32_t, param_t C.int64_t, param_u C.nint) { 67 _param_x := int8(param_x) 68 _param_y := int16(param_y) 69 _param_z := int32(param_z) 70 _param_t := int64(param_t) 71 _param_u := int(param_u) 72 basictypes.Ints(_param_x, _param_y, _param_z, _param_t, _param_u) 73 }