Lines Matching defs:func
31 Py_DECREF(cb->func);
96 // bpo-46025: Increment the refcount of cb->func as the call itself may unregister it
97 PyObject* the_func = Py_NewRef(cb->func);
98 PyObject *res = PyObject_Call(cb->func, cb->args, cb->kwargs);
127 "register(func, *args, **kwargs) -> func\n\
131 func - function to be called at exit\n\
132 args - optional arguments to pass to func\n\
133 kwargs - optional keyword arguments to pass to func\n\
135 func is returned to facilitate usage as a decorator.");
146 PyObject *func = PyTuple_GET_ITEM(args, 0);
147 if (!PyCallable_Check(func)) {
175 callback->func = Py_NewRef(func);
180 return Py_NewRef(func);
223 "unregister(func) -> None\n\
228 func - function to be unregistered");
231 atexit_unregister(PyObject *module, PyObject *func)
241 int eq = PyObject_RichCompareBool(cb->func, func, Py_EQ);