]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: fix cgo with gccgo
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 8 Apr 2016 02:27:35 +0000 (14:27 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Fri, 8 Apr 2016 23:27:33 +0000 (23:27 +0000)
Change-Id: I1780899255e22c16d7f8e9947609a1c284d7c42e
Reviewed-on: https://go-review.googlesource.com/21690
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/cgo/out.go

index 621c41c6b2352b678db0a313ac0c6f6b71936909..88b0147364eadb44870c42c328f30e31a74d98a7 100644 (file)
@@ -1451,7 +1451,7 @@ const char *_cgoPREFIX_Cfunc_CString(struct __go_string s) {
 
 void *_cgoPREFIX_Cfunc_CBytes(struct __go_open_array b) {
        char *p = malloc(b.__count);
-       memmove(p, b.__data, b.__count);
+       memmove(p, b.__values, b.__count);
        return p;
 }