mirror of
https://github.com/golang/go
synced 2024-11-26 14:26:51 -07:00
fdc4b4a47f
R=r DELTA=494 (492 added, 0 deleted, 2 changed) OCL=33784 CL=33810
21 lines
462 B
C
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);
|
|
}
|