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

//line /tmp/cgostdio1076317034/src/cgostdio/stdio/file.go:1:1
// skip

// 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 ../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 :26:11*/_Ctype_FILE /*line :26: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 :33:7*/_Cfunc_CString /*line :33:15*/)(s)
	func() _Ctype_int{ var _cgo0 *_Ctype_char = /*line :34:10*/p; _cgo1 := /*line :34:13*/(*_Ctype_FILE /*line :34:21*/)(f); _cgoCheckPointer(_cgo1, nil); return _Cfunc_fputs(_cgo0, _cgo1); }()
	func() { _cgo0 := /*line :35:9*/unsafe.Pointer(p); _cgoCheckPointer(_cgo0, nil); _Cfunc_free(_cgo0); }()
	f.Flush()
}

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

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