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

Function NewModule

module.go:47–57  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

45}
46
47func NewModule(name string) (*Module, error) {
48 cname := C.CString(name)
49 defer C.free(unsafe.Pointer(cname))
50
51 ret := C.PyModule_New(cname)
52 if ret == nil {
53 return nil, exception()
54 }
55
56 return newModule(ret), nil
57}
58
59func AsModule(o *Base) (v *Module, ok bool) {
60 if ok = C.moduleCheck(o.c()) != 0; ok {

Callers

nothing calls this directly

Calls 2

exceptionFunction · 0.85
newModuleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…