2021-06-07 22:33:34 +03:00
|
|
|
package main
|
|
|
|
|
2022-02-05 16:28:20 +02:00
|
|
|
// #define _FILE_OFFSET_BITS 64
|
|
|
|
// #include <unistd.h>
|
|
|
|
// #include <fcntl.h>
|
2021-06-07 22:33:34 +03:00
|
|
|
// #include <stdio.h>
|
2022-01-28 15:49:24 +02:00
|
|
|
// char* hello() { return "hello, world"; }
|
2022-02-05 16:28:20 +02:00
|
|
|
// void phello() { printf("%s, your lucky number is %p\n", hello(), fcntl); }
|
2021-06-07 22:33:34 +03:00
|
|
|
import "C"
|
|
|
|
|
|
|
|
func main() {
|
2022-02-05 16:28:20 +02:00
|
|
|
C.phello()
|
2022-01-28 14:40:03 +02:00
|
|
|
}
|
|
|
|
|
2022-01-28 15:57:22 +02:00
|
|
|
func Chello() string {
|
2022-01-28 14:40:03 +02:00
|
|
|
return C.GoString(C.hello())
|
2021-06-07 22:33:34 +03:00
|
|
|
}
|