// int PyFunction_SetClosure(PyObject *op, PyObject *closure) // Set the closure associated with the function object op. closure must be Py_None or a tuple of cell objects. // // Raises SystemError and returns -1 on failure. func PyFunction_SetClosure(op, closure *PyObject) error { return int2err(C.PyFunction_SetClosure(topy(op), topy(closure))) }
// SetClosure sets the closure associated with function "fn". "o" must be // either a Tuple of Cell objects, or None. func (fn *Function) SetClosure(o Object) error { ret := C.PyFunction_SetClosure(c(fn), c(o)) return int2Err(ret) }