MCPcopy Create free account
hub / github.com/goplus/py / ExecCodeModule

Function ExecCodeModule

module.go:37–45  ·  view source on GitHub ↗
(name string, code *Base)

Source from the content-addressed store, hash-verified

35}
36
37func ExecCodeModule(name string, code *Base) (*Module, error) {
38 s := C.CString(name)
39 defer C.free(unsafe.Pointer(s))
40 ret := C.PyImport_ExecCodeModule(s, code.c())
41 if ret == nil {
42 return nil, exception()
43 }
44 return newModule(ret), nil
45}
46
47func NewModule(name string) (*Module, error) {
48 cname := C.CString(name)

Callers 2

TestModuleFunction · 0.85
TestGoModuleFunction · 0.85

Calls 3

exceptionFunction · 0.85
newModuleFunction · 0.85
cMethod · 0.80

Tested by 2

TestModuleFunction · 0.68
TestGoModuleFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…