Lines Matching defs:func
101 PyThreadState *tstate, PyObject *func,
198 static int check_args_iterable(PyThreadState *, PyObject *func, PyObject *vararg);
201 static void format_kwargs_error(PyThreadState *, PyObject *func, PyObject *kwargs);
205 _PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
342 _Py_FatalError_TstateNULL(const char *func)
344 _Py_FatalErrorFunc(func,
588 int (*func)(void *), void *arg)
595 pending->calls[i].func = func;
604 int (**func)(void *), void **arg)
611 *func = pending->calls[i].func;
623 int (*func)(void *), void *arg)
632 int result = _push_pending_call(pending, func, arg);
641 Py_AddPendingCall(int (*func)(void *), void *arg)
668 return _PyEval_AddPendingCall(interp, func, arg);
711 int (*func)(void *) = NULL;
716 _pop_pending_call(pending, &func, &arg);
720 if (func == NULL) {
723 res = func(arg);
1150 PyFunctionObject *func = _PyFunction_FromConstructor(&desc);
1151 if (func == NULL) {
1154 PyObject *res = _PyEval_Vector(tstate, func, locals, NULL, 0, NULL);
1155 Py_DECREF(func);
4849 PyFunctionObject *func = (PyFunctionObject *)callable;
4850 DEOPT_IF(func->func_version != read_u32(cache->func_version), CALL);
4851 PyCodeObject *code = (PyCodeObject *)func->func_code;
4854 _PyInterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
4883 PyFunctionObject *func = (PyFunctionObject *)callable;
4884 DEOPT_IF(func->func_version != read_u32(cache->func_version), CALL);
4885 PyCodeObject *code = (PyCodeObject *)func->func_code;
4890 _PyInterpreterFrame *new_frame = _PyFrame_Push(tstate, func);
4900 PyObject *def = PyTuple_GET_ITEM(func->func_defaults,
5054 /* res = func(self, args, nargs) */
5092 /* res = func(self, args, nargs, kwnames) */
5349 PyObject *func, *callargs, *kwargs = NULL, *result;
5368 func = TOP();
5370 if (check_args_iterable(tstate, func, callargs) < 0) {
5381 result = do_call_core(tstate, func, callargs, kwargs, cframe.use_tracing);
5382 Py_DECREF(func);
5398 PyFunctionObject *func = (PyFunctionObject *)
5402 if (func == NULL) {
5408 func->func_closure = POP();
5412 func->func_annotations = POP();
5416 func->func_kwdefaults = POP();
5420 func->func_defaults = POP();
5423 PUSH((PyObject *)func);
6137 initialize_locals(PyThreadState *tstate, PyFunctionObject *func,
6141 PyCodeObject *co = (PyCodeObject*)func->func_code;
6212 func->func_qualname);
6244 func->func_qualname))
6251 func->func_qualname, keyword);
6272 func->func_qualname, keyword);
6281 too_many_positional(tstate, co, argcount, func->func_defaults, localsplus,
6282 func->func_qualname);
6288 Py_ssize_t defcount = func->func_defaults == NULL ? 0 : PyTuple_GET_SIZE(func->func_defaults);
6298 func->func_qualname);
6306 PyObject **defs = &PyTuple_GET_ITEM(func->func_defaults, 0);
6324 if (func->func_kwdefaults != NULL) {
6325 PyObject *def = PyDict_GetItemWithError(func->func_kwdefaults, varname);
6339 func->func_qualname);
6362 /* Consumes references to func and all the args */
6364 _PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
6368 PyCodeObject * code = (PyCodeObject *)func->func_code;
6375 _PyFrame_InitializeSpecials(frame, func, locals, code->co_nlocalsplus);
6380 if (initialize_locals(tstate, func, localsarray, args, argcount, kwnames)) {
6417 _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
6423 * to func and all its arguments */
6424 Py_INCREF(func);
6435 tstate, func, locals, args, argcount, kwnames);
6473 PyFunctionObject *func = NULL;
6506 func = _PyFunction_FromConstructor(&constr);
6507 if (func == NULL) {
6510 res = _PyEval_Vector(tstate, func, locals,
6514 Py_XDECREF(func);
6780 call_exc_trace(Py_tracefunc func, PyObject *self,
6798 err = call_trace(func, self, tstate, f, PyTrace_EXCEPTION, arg);
6811 call_trace_protected(Py_tracefunc func, PyObject *obj,
6818 err = call_trace(func, obj, tstate, frame, what, arg);
6858 call_trace(Py_tracefunc func, PyObject *obj,
6878 result = func(obj, f, what, arg);
6886 _PyEval_CallTracing(PyObject *func, PyObject *args)
6895 PyObject *result = PyObject_Call(func, args, NULL);
6905 maybe_call_line_trace(Py_tracefunc func, PyObject *obj,
6937 result = call_trace(func, obj, tstate, frame, PyTrace_LINE, Py_None);
6942 result = call_trace(func, obj, tstate, frame, PyTrace_OPCODE, Py_None);
6948 _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg)
6981 tstate->c_profilefunc = func;
6990 PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
6993 if (_PyEval_SetProfile(tstate, func, arg) < 0) {
7000 _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg)
7033 tstate->c_tracefunc = func;
7043 PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
7046 if (_PyEval_SetTrace(tstate, func, arg) < 0) {
7227 PyEval_GetFuncName(PyObject *func)
7229 if (PyMethod_Check(func))
7230 return PyEval_GetFuncName(PyMethod_GET_FUNCTION(func));
7231 else if (PyFunction_Check(func))
7232 return PyUnicode_AsUTF8(((PyFunctionObject*)func)->func_name);
7233 else if (PyCFunction_Check(func))
7234 return ((PyCFunctionObject*)func)->m_ml->ml_name;
7236 return Py_TYPE(func)->tp_name;
7240 PyEval_GetFuncDesc(PyObject *func)
7242 if (PyMethod_Check(func))
7244 else if (PyFunction_Check(func))
7246 else if (PyCFunction_Check(func))
7256 PyTrace_C_CALL, func)) { \
7266 PyTrace_C_EXCEPTION, func); \
7272 PyTrace_C_RETURN, func)) { \
7286 PyObject *func,
7292 if (PyCFunction_CheckExact(func) || PyCMethod_CheckExact(func)) {
7293 C_TRACE(x, PyObject_Vectorcall(func, args, nargs, kwnames));
7296 else if (Py_IS_TYPE(func, &PyMethodDescr_Type) && nargs > 0) {
7305 func = Py_TYPE(func)->tp_descr_get(func, self, (PyObject*)Py_TYPE(self));
7306 if (func == NULL) {
7309 C_TRACE(x, PyObject_Vectorcall(func,
7312 Py_DECREF(func);
7315 return PyObject_Vectorcall(func, args, nargs | PY_VECTORCALL_ARGUMENTS_OFFSET, kwnames);
7320 PyObject *func,
7328 if (PyCFunction_CheckExact(func) || PyCMethod_CheckExact(func)) {
7329 C_TRACE(result, PyObject_Call(func, callargs, kwdict));
7332 else if (Py_IS_TYPE(func, &PyMethodDescr_Type)) {
7343 func = Py_TYPE(func)->tp_descr_get(func, self, (PyObject*)Py_TYPE(self));
7344 if (func == NULL) {
7349 tstate, func,
7353 Py_DECREF(func);
7357 return PyObject_Call(func, callargs, kwdict);
7681 check_args_iterable(PyThreadState *tstate, PyObject *func, PyObject *args)
7688 PyObject *funcstr = _PyObject_FunctionStr(func);
7701 format_kwargs_error(PyThreadState *tstate, PyObject *func, PyObject *kwargs)
7711 PyObject *funcstr = _PyObject_FunctionStr(func);
7725 PyObject *funcstr = _PyObject_FunctionStr(func);