src/pkg/runtime/cgo/cgo.go - The Go Programming Language

Golang

Source file src/pkg/runtime/cgo/cgo.go

     1	// Copyright 2010 The Go Authors.  All rights reserved.
     2	// Use of this source code is governed by a BSD-style
     3	// license that can be found in the LICENSE file.
     4	
     5	/*
     6	Package cgo contains runtime support for code generated
     7	by the cgo tool.  See the documentation for the cgo command
     8	for details on using cgo.
     9	*/
    10	package cgo
    11	
    12	/*
    13	
    14	#cgo darwin LDFLAGS: -lpthread
    15	#cgo freebsd LDFLAGS: -lpthread
    16	#cgo linux LDFLAGS: -lpthread
    17	#cgo netbsd LDFLAGS: -lpthread
    18	#cgo openbsd LDFLAGS: -lpthread
    19	#cgo windows LDFLAGS: -lm -mthreads
    20	
    21	*/
    22	import "C"
    23	
    24	// Supports _cgo_panic by converting a string constant to an empty
    25	// interface.
    26	
    27	func cgoStringToEface(s string, ret *interface{}) {
    28		*ret = s
    29	}