Re: [go-nuts] convert *byte to []byte

2018-12-09 Thread Tamás Gulácsi
&slice [0] -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

Re: [go-nuts] convert *byte to []byte

2018-12-09 Thread xiang liu
Thanks, C.GoBytes Works well. Another question. How to convert []byte to *byte backward? Ian Lance Taylor 于2018年12月3日周一 下午1:01写道: > On Sat, Dec 1, 2018 at 9:39 AM wrote: > > > > I am using swig wrap a c++ module , the generated go code is like this: > > > > type MediaFrame inter

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread 'Bryan C. Mills' via golang-nuts
On Fri, Dec 7, 2018 at 10:50 AM roger peppe wrote: > On Fri, 7 Dec 2018, 3:26 pm 'Bryan Mills' via golang-nuts < > golang-nuts@googlegroups.com wrote: > >> On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: >>> >>> On Sat, Dec 1, 2018 at 9:39 AM wrote: >>> > >>> > I am usi

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread roger peppe
On Fri, 7 Dec 2018, 3:26 pm 'Bryan Mills' via golang-nuts < golang-nuts@googlegroups.com wrote: > On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: >> >> On Sat, Dec 1, 2018 at 9:39 AM wrote: >> > >> > I am using swig wrap a c++ module , the generated go code is like this:

Re: [go-nuts] convert *byte to []byte

2018-12-07 Thread 'Bryan Mills' via golang-nuts
On Monday, December 3, 2018 at 12:02:07 AM UTC-5, Ian Lance Taylor wrote: > > On Sat, Dec 1, 2018 at 9:39 AM > wrote: > > > > I am using swig wrap a c++ module , the generated go code is like this: > > > > type MediaFrame interface { > > GetLength() uint > > GetData() (*byte) >

Re: [go-nuts] convert *byte to []byte

2018-12-02 Thread Ian Lance Taylor
On Sat, Dec 1, 2018 at 9:39 AM wrote: > > I am using swig wrap a c++ module , the generated go code is like this: > > type MediaFrame interface { > GetLength() uint > GetData() (*byte) > } > > I want to convert the *byte to []byte, How to do this? One approach is s := (*[1<<30]byt

[go-nuts] convert *byte to []byte

2018-12-01 Thread Tamás Gulácsi
C.GoBytes -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.

[go-nuts] convert *byte to []byte

2018-12-01 Thread leeoxiang
Hi: I am using swig wrap a c++ module , the generated go code is like this: type MediaFrame interface { GetLength() uint GetData() (*byte) } I want to convert the *byte to []byte, How to do this? -- You received this message because you are subscribed to the Google Groups