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

Method Run

code.go:100–108  ·  view source on GitHub ↗
(globals, locals *Base)

Source from the content-addressed store, hash-verified

98}
99
100func (code *Code) Run(globals, locals *Base) error {
101 pyCode := (*C.PyCodeObject)(unsafe.Pointer(code))
102 ret := C.PyEval_EvalCode(pyCode, globals.c(), locals.c())
103 if ret == nil {
104 return exception()
105 }
106 C.decref(ret)
107 return nil
108}
109
110// ------------------------------------------------------------------------------------------
111

Callers 1

_TestEvalLocalGlobalsFunction · 0.80

Calls 2

exceptionFunction · 0.85
cMethod · 0.80

Tested by 1

_TestEvalLocalGlobalsFunction · 0.64