Re: [go-nuts] go vet error on generated code by Swig

2019-11-19 Thread Vishnu
Thanks Ian. Yeah. I am generating those files and committing them. I will try the option you suggested On Tuesday, November 19, 2019 at 8:23:02 AM UTC-8, Ian Lance Taylor wrote: > > On Tue, Nov 19, 2019 at 7:17 AM Vishnu > > wrote: > > > > Sorry. Yes, I was trying to modify the code to see if

Re: [go-nuts] go vet error on generated code by Swig

2019-11-19 Thread Ian Lance Taylor
On Tue, Nov 19, 2019 at 7:17 AM Vishnu wrote: > > Sorry. Yes, I was trying to modify the code to see if the error goes away. > > type swig_gostring struct { p uintptr; n int } > func swigCopyString(s string) string { > p := *(*swig_gostring)(unsafe.Pointer()) > r :=

Re: [go-nuts] go vet error on generated code by Swig

2019-11-19 Thread Vishnu
Sorry. Yes, I was trying to modify the code to see if the error goes away. type swig_gostring struct { p uintptr; n int } func swigCopyString(s string) string { p := *(*swig_gostring)(unsafe.Pointer()) r := string((*[0x7fff]byte)(unsafe.Pointer(p.p))[:p.n]) // This line gives the go vet

Re: [go-nuts] go vet error on generated code by Swig

2019-11-19 Thread Ian Lance Taylor
On Tue, Nov 19, 2019 at 5:43 AM Vishnu wrote: > > Hi, I am using swig to generate a go wrapper for one of my projects. I am > seeing the following error in generated code. Is there any workaround for > this? > > type swig_gostring struct { p uintptr; n int } > func swigCopyString(s string)

[go-nuts] go vet error on generated code by Swig

2019-11-19 Thread Vishnu
Hi, I am using swig to generate a go wrapper for one of my projects. I am seeing the following error in generated code. Is there any workaround for this? type swig_gostring struct { p uintptr; n int } func swigCopyString(s string) string { p := *(*swig_gostring)(unsafe.Pointer()) up :=