1
0
mirror of https://github.com/golang/go synced 2024-11-26 06:17:57 -07:00
go/usr/rsc/fib/6c.c
Russ Cox fdc4b4a47f start of FFI support, and a demo.
R=r
DELTA=494  (492 added, 0 deleted, 2 changed)
OCL=33784
CL=33810
2009-08-24 17:30:00 -07:00

21 lines
462 B
C

// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "runtime.h"
#include "cgocall.h"
// turn on ffi
#pragma dynld initcgo initcgo "libcgo.so"
#pragma dynld cgo cgo "libcgo.so"
// pull in fib from fib.so
#pragma dynld extern_c_fib fib "fib.so"
void (*extern_c_fib)(void*);
void
fib·Fib(int32 n, int32, int32)
{
cgocall(extern_c_fib, &n);
}