github.com/coming-chat/gomobile@v0.0.0-20220601074111-56995f7d7aba/bind/testdata/underscores.go.golden (about) 1 // Code generated by gobind. DO NOT EDIT. 2 3 // Package main is an autogenerated binder stub for package underscore_pkg. 4 // 5 // autogenerated by gobind -lang=go underscores 6 package main 7 8 /* 9 #include <stdlib.h> 10 #include <stdint.h> 11 #include "seq.h" 12 #include "underscore_pkg.h" 13 14 */ 15 import "C" 16 17 import ( 18 _seq "golang.org/x/mobile/bind/seq" 19 "underscores" 20 ) 21 22 // suppress the error if seq ends up unused 23 var _ = _seq.FromRefNum 24 25 //export proxyunderscore_pkg_Underscore_struct_Underscore_field_Set 26 func proxyunderscore_pkg_Underscore_struct_Underscore_field_Set(refnum C.int32_t, v C.nstring) { 27 ref := _seq.FromRefNum(int32(refnum)) 28 _v := decodeString(v) 29 ref.Get().(*underscore_pkg.Underscore_struct).Underscore_field = _v 30 } 31 32 //export proxyunderscore_pkg_Underscore_struct_Underscore_field_Get 33 func proxyunderscore_pkg_Underscore_struct_Underscore_field_Get(refnum C.int32_t) C.nstring { 34 ref := _seq.FromRefNum(int32(refnum)) 35 v := ref.Get().(*underscore_pkg.Underscore_struct).Underscore_field 36 _v := encodeString(v) 37 return _v 38 } 39 40 //export new_underscore_pkg_Underscore_struct 41 func new_underscore_pkg_Underscore_struct() C.int32_t { 42 return C.int32_t(_seq.ToRefNum(new(underscore_pkg.Underscore_struct))) 43 } 44 45 //export var_setunderscore_pkg_Underscore_var 46 func var_setunderscore_pkg_Underscore_var(v C.nint) { 47 _v := int(v) 48 underscore_pkg.Underscore_var = _v 49 } 50 51 //export var_getunderscore_pkg_Underscore_var 52 func var_getunderscore_pkg_Underscore_var() C.nint { 53 v := underscore_pkg.Underscore_var 54 _v := C.nint(v) 55 return _v 56 } 57 58 //export proxyunderscore_pkg__Underscore_func 59 func proxyunderscore_pkg__Underscore_func() { 60 underscore_pkg.Underscore_func() 61 }