llgo/ssa: PyFunction; NewPyFunc

This commit is contained in:
xushiwei
2024-05-11 21:55:50 +08:00
parent 15499ddc14
commit a2d7a8c978
8 changed files with 129 additions and 68 deletions

12
cl/_testpy/callpy/in.go Normal file
View File

@@ -0,0 +1,12 @@
package main
import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/py"
"github.com/goplus/llgo/py/math"
)
func main() {
x := math.Sqrt(py.Float(2))
c.Printf(c.Str("sqrt(2) = %f\n"), x.Float64())
}

0
cl/_testpy/callpy/out.ll Normal file
View File