compileBlock: support pyModule init

This commit is contained in:
xushiwei
2024-05-11 11:33:35 +08:00
parent 427d87be68
commit 00222c7808
4 changed files with 75 additions and 26 deletions

View File

@@ -402,6 +402,10 @@ func pkgKindByPath(pkgPath string) int {
// -----------------------------------------------------------------------------
const (
pysymPrefix = "__llgo_py."
)
func (p *context) initPyModule() {
if kind, mod := pkgKindByScope(p.goTyps.Scope()); kind == PkgPyModule {
p.pyMod = mod