aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-cgo.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2012-11-01 03:02:13 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-11-01 03:02:13 +0000
commit776f27a67f26c795ba8c27a4e69525382b9379c3 (patch)
tree0285cca6b375a23d93c20efec03cb9adec30f0e0 /libgo/runtime/go-cgo.c
parent79e0221796bf5897204e8077afc20e34f88dab3b (diff)
downloadgcc-776f27a67f26c795ba8c27a4e69525382b9379c3.zip
gcc-776f27a67f26c795ba8c27a4e69525382b9379c3.tar.gz
gcc-776f27a67f26c795ba8c27a4e69525382b9379c3.tar.bz2
compiler, runtime: More steps toward separating int and intgo.
From-SVN: r193059
Diffstat (limited to 'libgo/runtime/go-cgo.c')
-rw-r--r--libgo/runtime/go-cgo.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libgo/runtime/go-cgo.c b/libgo/runtime/go-cgo.c
index 173696e..d0c89f2 100644
--- a/libgo/runtime/go-cgo.c
+++ b/libgo/runtime/go-cgo.c
@@ -8,7 +8,6 @@
#include "go-alloc.h"
#include "interface.h"
#include "go-panic.h"
-#include "go-string.h"
/* Go memory allocated by code not written in Go. We keep a linked
list of these allocations so that the garbage collector can see
@@ -135,9 +134,9 @@ extern const struct __go_type_descriptor string_type_descriptor
void
_cgo_panic (const char *p)
{
- int len;
+ intgo len;
unsigned char *data;
- struct __go_string *ps;
+ String *ps;
struct __go_empty_interface e;
runtime_exitsyscall ();
@@ -145,8 +144,8 @@ _cgo_panic (const char *p)
data = alloc_saved (len);
__builtin_memcpy (data, p, len);
ps = alloc_saved (sizeof *ps);
- ps->__data = data;
- ps->__length = len;
+ ps->str = data;
+ ps->len = len;
e.__type_descriptor = &string_type_descriptor;
e.__object = ps;