From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- src/pkg/runtime/cgo/gcc_util.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/pkg/runtime/cgo/gcc_util.c') diff --git a/src/pkg/runtime/cgo/gcc_util.c b/src/pkg/runtime/cgo/gcc_util.c index e06b6f64d..20913d736 100644 --- a/src/pkg/runtime/cgo/gcc_util.c +++ b/src/pkg/runtime/cgo/gcc_util.c @@ -5,7 +5,7 @@ #include "libcgo.h" /* Stub for calling malloc from Go */ -static void +void x_cgo_malloc(void *p) { struct a { @@ -16,10 +16,8 @@ x_cgo_malloc(void *p) a->ret = malloc(a->n); } -void (*_cgo_malloc)(void*) = x_cgo_malloc; - /* Stub for calling free from Go */ -static void +void x_cgo_free(void *p) { struct a { @@ -29,11 +27,9 @@ x_cgo_free(void *p) free(a->arg); } -void (*_cgo_free)(void*) = x_cgo_free; - /* Stub for creating a new thread */ -static void -xlibcgo_thread_start(ThreadStart *arg) +void +x_cgo_thread_start(ThreadStart *arg) { ThreadStart *ts; @@ -45,7 +41,5 @@ xlibcgo_thread_start(ThreadStart *arg) } *ts = *arg; - libcgo_sys_thread_start(ts); /* OS-dependent half */ + _cgo_sys_thread_start(ts); /* OS-dependent half */ } - -void (*libcgo_thread_start)(ThreadStart*) = xlibcgo_thread_start; -- cgit v1.2.3