]> Cypherpunks repositories - gostls13.git/commit
runtime: add cgocallback_gofunc that can call Go func value
authorRuss Cox <rsc@golang.org>
Fri, 22 Feb 2013 21:08:56 +0000 (16:08 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 22 Feb 2013 21:08:56 +0000 (16:08 -0500)
commit3d2dfc5a7b254295d41d9104d6a53ebad5125afc
treeb9f07eb6a0fff097fb59e64fb8b63e1b6a7096de
parent96f57186ba79b6a649fa0bb901ee5b222877f0d3
runtime: add cgocallback_gofunc that can call Go func value

For now, all the callbacks from C use top-level Go functions,
so they use the equivalent C function pointer, and will continue
to do so. But perhaps some day this will be useful for calling
a Go func value (at least if the type is already known).

More importantly, the Windows callback code needs to be able
to use cgocallback_gofunc to call a Go func value.
Should fix the Windows build.

R=ken2
CC=golang-dev
https://golang.org/cl/7388049
src/pkg/runtime/asm_386.s
src/pkg/runtime/asm_amd64.s
src/pkg/runtime/asm_arm.s
src/pkg/runtime/callback_windows_386.c
src/pkg/runtime/callback_windows_amd64.c
src/pkg/runtime/cgocall.c
src/pkg/runtime/sys_windows_386.s
src/pkg/runtime/sys_windows_amd64.s