FuncDecl bugfix: even in C, we need to add ctx for method

This commit is contained in:
xushiwei
2024-05-12 23:37:12 +08:00
parent f7dfab481b
commit acfbe6902a
4 changed files with 13 additions and 30 deletions

View File

@@ -4,12 +4,9 @@ import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/py"
"github.com/goplus/llgo/py/math"
"github.com/goplus/llgo/py/os"
)
func main() {
x := math.Sqrt(py.Float(2))
wd := os.Getcwd()
c.Printf(c.Str("sqrt(2) = %f\n"), x.Float64())
c.Printf(c.Str("cwd = %s\n"), wd.CStr())
}