vkFuncDecl, vkFuncPtr, vkClosure; callback example

This commit is contained in:
xushiwei
2024-05-05 15:59:33 +08:00
parent 03a194a514
commit 067cf0cba6
11 changed files with 136 additions and 38 deletions

15
cl/_testrt/callback/in.go Normal file
View File

@@ -0,0 +1,15 @@
package main
import (
"github.com/goplus/llgo/internal/runtime/c"
)
func callback(f func()) {
f()
}
func main() {
callback(func() {
c.Printf(c.Str("Hello, callback\n"))
})
}