From 598de87b0fa26dd13964c035e561f673d058baf5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 23 May 2013 23:19:47 -0700 Subject: [PATCH] cmd/cgo: change GoStringN and GoBytes from intgo to int32 Fixes build. R=golang-dev CC=golang-dev https://golang.org/cl/9667047 --- src/cmd/cgo/out.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 810b57d692..d9f7604962 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -1040,8 +1040,8 @@ typedef int intgo; typedef struct { char *p; intgo n; } _GoString_; typedef struct { char *p; intgo n; intgo c; } _GoBytes_; _GoString_ GoString(char *p); -_GoString_ GoStringN(char *p, intgo l); -_GoBytes_ GoBytes(void *p, intgo n); +_GoString_ GoStringN(char *p, int l); +_GoBytes_ GoBytes(void *p, int n); char *CString(_GoString_); ` @@ -1059,14 +1059,14 @@ void } void -·_Cfunc_GoStringN(int8 *p, intgo l, String s) +·_Cfunc_GoStringN(int8 *p, int32 l, String s) { s = runtime·gostringn((byte*)p, l); FLUSH(&s); } void -·_Cfunc_GoBytes(int8 *p, intgo l, Slice s) +·_Cfunc_GoBytes(int8 *p, int32 l, Slice s) { s = runtime·gobytes((byte*)p, l); FLUSH(&s); @@ -1112,11 +1112,11 @@ struct __go_string GoString(char *p) { return __go_byte_array_to_string(p, len); } -struct __go_string GoStringN(char *p, intgo n) { +struct __go_string GoStringN(char *p, int32_t n) { return __go_byte_array_to_string(p, n); } -Slice GoBytes(char *p, intgo n) { +Slice GoBytes(char *p, int32_t n) { struct __go_string s = { (const unsigned char *)p, n }; return __go_string_to_byte_array(s); } -- 2.48.1