2023-03-02 23:42:35 +02:00
|
|
|
// Copyright 2023 Uber Technologies, Inc.
|
2023-04-20 03:23:25 +03:00
|
|
|
// Licensed under the MIT License
|
2023-03-02 23:42:35 +02:00
|
|
|
|
2021-06-07 22:33:34 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
// #include <stdio.h>
|
2022-01-28 15:49:24 +02:00
|
|
|
// char* hello() { return "hello, world"; }
|
2023-01-18 22:39:35 +02:00
|
|
|
// void phello() { printf("%s\n", hello()); }
|
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
|
|
|
}
|