Skip to content

Commit

Permalink
cgo: test returning void
Browse files Browse the repository at this point in the history
  • Loading branch information
cpunion committed Nov 26, 2024
1 parent ca60adb commit edce52c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cl/_testgo/cgofull/cgofull.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ static void test_macros() {
#define MY_VERSION "1.0.0"
#define MY_CODE 0x12345678
void test_void() {
printf("test_void\n");
}
*/
import "C"
import (
Expand All @@ -99,6 +103,7 @@ func main() {
}
fmt.Println(C.MY_VERSION)
fmt.Println(int(C.MY_CODE))
C.test_void()
}

func runPy() {
Expand Down

0 comments on commit edce52c

Please sign in to comment.