// Code generated by cmd/cgo; DO NOT EDIT.

//line /tmp/cgostdio1216302548/src/cgostdio/stdio/file.go:1:1
// 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.

/*
A trivial example of wrapping a C library in Go.
For a more complex example and explanation,
see misc/cgo/gmp/gmp.go.
*/

package stdio

/*
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <errno.h>

char* greeting = "hello, world";
*/
import _ "unsafe"
import "unsafe"

type File  /*line :24:11*/_Ctype_FILE /*line :24:17*/

// Test reference to library symbol.
// Stdout and stderr are too special to be a reliable test.
//var  = C.environ

func (f *File) WriteString(s string) {
	p := ( /*line :31:7*/_Cfunc_CString /*line :31:15*/)(s)
	func() _Ctype_int{ var _cgo0 *_Ctype_char = /*line :32:10*/p; _cgo1 := /*line :32:13*/(*_Ctype_FILE /*line :32:21*/)(f); _cgoCheckPointer(_cgo1, nil); return /*line :32:26*/_Cfunc_fputs(_cgo0, _cgo1); }()
	func() { _cgo0 := /*line :33:9*/unsafe.Pointer(p); _cgoCheckPointer(_cgo0, nil); /*line :33:27*/_Cfunc_free(_cgo0); }()
	f.Flush()
}

func (f *File) Flush() {
	func() _Ctype_int{ _cgo0 := /*line :38:11*/(*_Ctype_FILE /*line :38:19*/)(f); _cgoCheckPointer(_cgo0, nil); return /*line :38:24*/_Cfunc_fflush(_cgo0); }()
}

var Greeting = ( /*line :41:16*/_Cfunc_GoString /*line :41:25*/)(( /*line :41:27*/*_Cvar_greeting /*line :41:36*/))
var Gbytes = func() []byte{ _cgo0 := /*line :42:24*/unsafe.Pointer(*_Cvar_greeting /*line :42:49*/); var _cgo1 _Ctype_int = _Ctype_int /*line :42:57*/(len(Greeting)); _cgoCheckPointer(_cgo0, nil); return /*line :42:73*/_Cfunc_GoBytes(_cgo0, _cgo1); }()
