the code is below.
```
package main
import "math/rand"
import "fmt"
/*
#include
#include
void t(const short *buf, size_t buf_size) {
printf("in t.");
printf("0: %d ", buf[0]);
printf("buf_size-1: %d\n", buf[buf_size-1]);
}
*/
import "C"
func main() {
for {
a := make([]byte, 178209)
rand.Read
thank you. now, I understand.
Ian Lance Taylor於 2018年1月31日星期三 UTC+8下午1時29分09秒寫道:
>
> On Tue, Jan 30, 2018 at 9:13 PM, hǎi sū >
> wrote:
> > the code is below.
> > ```
> > package main
> >
> > import "math/rand"
> > import "f
thank you.
andrey mirtchovski於 2018年1月31日星期三 UTC+8下午1時33分04秒寫道:
>
> on the Go side you have an array of bytes, on the C side you are
> passing a pointer to an array of shorts (16-bits)
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsub