move out c/cpp/py

This commit is contained in:
Li Jie
2025-04-03 15:52:18 +08:00
parent 0a8a4eb6a6
commit ed366568b4
777 changed files with 4608 additions and 139122 deletions

26
cl/_testrt/tpfunc/in.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"unsafe"
)
type Func func(*int)
//llgo:type C
type CFunc func(*int)
//llgo:type C
type Callback[T any] func(*T)
func main() {
var fn1 Func = func(v *int) {
println(*v)
}
var fn2 CFunc = func(v *int) {
println(*v)
}
var fn3 Callback[int] = func(v *int) {
println(*v)
}
println(unsafe.Sizeof(fn1), unsafe.Sizeof(fn2), unsafe.Sizeof(fn3))
}