func (code *Code) Run(globals, locals *Base) error { pyCode := (*C.PyCodeObject)(unsafe.Pointer(code)) ret := C.PyEval_EvalCode(pyCode, globals.c(), locals.c()) if ret == nil { return exception() } C.decref(ret) return nil }
// Return value: New reference. func (code *Code) Eval(globals, locals *Base) (*Base, error) { pyCode := (*C.PyCodeObject)(unsafe.Pointer(code)) ret := C.PyEval_EvalCode(pyCode, globals.c(), locals.c()) return obj2ObjErr(ret) }
func (code *Code) Eval(globals, locals Object) (Object, error) { pyCode := (*C.PyObject)(unsafe.Pointer(code)) ret := C.PyEval_EvalCode(pyCode, c(globals), c(locals)) return obj2ObjErr(ret) }