github.com/huandu/go@v0.0.0-20151114150818-04e615e41150/misc/cgo/test/issue2462.go (about)

     1  // Copyright 2011 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  package cgotest
     6  
     7  import "C"
     8  
     9  //export exportbyte
    10  func exportbyte() byte {
    11  	return 0
    12  }
    13  
    14  //export exportbool
    15  func exportbool() bool {
    16  	return false
    17  }
    18  
    19  //export exportrune
    20  func exportrune() rune {
    21  	return 0
    22  }
    23  
    24  //export exporterror
    25  func exporterror() error {
    26  	return nil
    27  }
    28  
    29  //export exportint
    30  func exportint() int {
    31  	return 0
    32  }
    33  
    34  //export exportuint
    35  func exportuint() uint {
    36  	return 0
    37  }
    38  
    39  //export exportuintptr
    40  func exportuintptr() uintptr {
    41  	return (uintptr)(0)
    42  }
    43  
    44  //export exportint8
    45  func exportint8() int8 {
    46  	return 0
    47  }
    48  
    49  //export exportuint8
    50  func exportuint8() uint8 {
    51  	return 0
    52  }
    53  
    54  //export exportint16
    55  func exportint16() int16 {
    56  	return 0
    57  }
    58  
    59  //export exportuint16
    60  func exportuint16() uint16 {
    61  	return 0
    62  }
    63  
    64  //export exportint32
    65  func exportint32() int32 {
    66  	return 0
    67  }
    68  
    69  //export exportuint32
    70  func exportuint32() uint32 {
    71  	return 0
    72  }
    73  
    74  //export exportint64
    75  func exportint64() int64 {
    76  	return 0
    77  }
    78  
    79  //export exportuint64
    80  func exportuint64() uint64 {
    81  	return 0
    82  }
    83  
    84  //export exportfloat32
    85  func exportfloat32() float32 {
    86  	return 0
    87  }
    88  
    89  //export exportfloat64
    90  func exportfloat64() float64 {
    91  	return 0
    92  }
    93  
    94  //export exportcomplex64
    95  func exportcomplex64() complex64 {
    96  	return 0
    97  }
    98  
    99  //export exportcomplex128
   100  func exportcomplex128() complex128 {
   101  	return 0
   102  }