Lines Matching refs:nargs

84 _PyObject_FastCallDict(PyObject *callable, PyObject *const *args, Py_ssize_t nargs,  in _PyObject_FastCallDict()  argument
93 assert(nargs >= 0); in _PyObject_FastCallDict()
94 assert(nargs == 0 || args != NULL); in _PyObject_FastCallDict()
98 return _PyFunction_FastCallDict(callable, args, nargs, kwargs); in _PyObject_FastCallDict()
101 return _PyCFunction_FastCallDict(callable, args, nargs, kwargs); in _PyObject_FastCallDict()
115 argstuple = _PyStack_AsTuple(args, nargs); in _PyObject_FastCallDict()
137 _PyObject_FastCallKeywords(PyObject *callable, PyObject *const *stack, Py_ssize_t nargs, in _PyObject_FastCallKeywords() argument
145 assert(nargs >= 0); in _PyObject_FastCallKeywords()
153 return _PyFunction_FastCallKeywords(callable, stack, nargs, kwnames); in _PyObject_FastCallKeywords()
156 return _PyCFunction_FastCallKeywords(callable, stack, nargs, kwnames); in _PyObject_FastCallKeywords()
168 assert((nargs == 0 && nkwargs == 0) || stack != NULL); in _PyObject_FastCallKeywords()
177 argstuple = _PyStack_AsTuple(stack, nargs); in _PyObject_FastCallKeywords()
183 kwdict = _PyStack_AsDict(stack + nargs, kwnames); in _PyObject_FastCallKeywords()
257 function_code_fastcall(PyCodeObject *co, PyObject *const *args, Py_ssize_t nargs, in function_code_fastcall() argument
279 for (i = 0; i < nargs; i++) { in function_code_fastcall()
299 _PyFunction_FastCallDict(PyObject *func, PyObject *const *args, Py_ssize_t nargs, in _PyFunction_FastCallDict() argument
312 assert(nargs >= 0); in _PyFunction_FastCallDict()
313 assert(nargs == 0 || args != NULL); in _PyFunction_FastCallDict()
321 if (argdefs == NULL && co->co_argcount == nargs) { in _PyFunction_FastCallDict()
322 return function_code_fastcall(co, args, nargs, globals); in _PyFunction_FastCallDict()
324 else if (nargs == 0 && argdefs != NULL in _PyFunction_FastCallDict()
377 args, nargs, in _PyFunction_FastCallDict()
387 Py_ssize_t nargs, PyObject *kwnames) in _PyFunction_FastCallKeywords() argument
398 assert(nargs >= 0); in _PyFunction_FastCallKeywords()
400 assert((nargs == 0 && nkwargs == 0) || stack != NULL); in _PyFunction_FastCallKeywords()
407 if (argdefs == NULL && co->co_argcount == nargs) { in _PyFunction_FastCallKeywords()
408 return function_code_fastcall(co, stack, nargs, globals); in _PyFunction_FastCallKeywords()
410 else if (nargs == 0 && argdefs != NULL in _PyFunction_FastCallKeywords()
434 stack, nargs, in _PyFunction_FastCallKeywords()
436 stack + nargs, in _PyFunction_FastCallKeywords()
447 PyObject *const *args, Py_ssize_t nargs, in _PyMethodDef_RawFastCallDict() argument
456 assert(nargs >= 0); in _PyMethodDef_RawFastCallDict()
457 assert(nargs == 0 || args != NULL); in _PyMethodDef_RawFastCallDict()
475 if (nargs != 0) { in _PyMethodDef_RawFastCallDict()
478 method->ml_name, nargs); in _PyMethodDef_RawFastCallDict()
490 if (nargs != 1) { in _PyMethodDef_RawFastCallDict()
493 method->ml_name, nargs); in _PyMethodDef_RawFastCallDict()
509 PyObject *argstuple = _PyStack_AsTuple(args, nargs); in _PyMethodDef_RawFastCallDict()
530 result = (*(_PyCFunctionFast)meth) (self, args, nargs); in _PyMethodDef_RawFastCallDict()
540 if (_PyStack_UnpackDict(args, nargs, kwargs, &stack, &kwnames) < 0) { in _PyMethodDef_RawFastCallDict()
544 result = (*fastmeth) (self, stack, nargs, kwnames); in _PyMethodDef_RawFastCallDict()
574 PyObject *const *args, Py_ssize_t nargs, in _PyCFunction_FastCallDict() argument
584 args, nargs, kwargs); in _PyCFunction_FastCallDict()
592 PyObject *const *args, Py_ssize_t nargs, in _PyMethodDef_RawFastCallKeywords() argument
601 assert(nargs >= 0); in _PyMethodDef_RawFastCallKeywords()
622 if (nargs != 0) { in _PyMethodDef_RawFastCallKeywords()
625 method->ml_name, nargs); in _PyMethodDef_RawFastCallKeywords()
637 if (nargs != 1) { in _PyMethodDef_RawFastCallKeywords()
640 method->ml_name, nargs); in _PyMethodDef_RawFastCallKeywords()
651 result = ((_PyCFunctionFast)meth) (self, args, nargs); in _PyMethodDef_RawFastCallKeywords()
656 result = ((_PyCFunctionFastWithKeywords)meth) (self, args, nargs, kwnames); in _PyMethodDef_RawFastCallKeywords()
671 argtuple = _PyStack_AsTuple(args, nargs); in _PyMethodDef_RawFastCallKeywords()
680 kwdict = _PyStack_AsDict(args + nargs, kwnames); in _PyMethodDef_RawFastCallKeywords()
722 PyObject *const *args, Py_ssize_t nargs, in _PyCFunction_FastCallKeywords() argument
732 args, nargs, kwnames); in _PyCFunction_FastCallKeywords()
842 PyObject *const *args, Py_ssize_t nargs) in _PyObject_FastCall_Prepend() argument
848 nargs++; in _PyObject_FastCall_Prepend()
849 if (nargs <= (Py_ssize_t)Py_ARRAY_LENGTH(small_stack)) { in _PyObject_FastCall_Prepend()
853 args2 = PyMem_Malloc(nargs * sizeof(PyObject *)); in _PyObject_FastCall_Prepend()
862 if (nargs > 1) { in _PyObject_FastCall_Prepend()
863 memcpy(&args2[1], args, (nargs - 1) * sizeof(PyObject *)); in _PyObject_FastCall_Prepend()
866 result = _PyObject_FastCall(callable, args2, nargs); in _PyObject_FastCall_Prepend()
923 Py_ssize_t nargs, i; in _PyObject_CallFunctionVa() local
936 format, va, &nargs); in _PyObject_CallFunctionVa()
940 format, va, &nargs); in _PyObject_CallFunctionVa()
946 if (nargs == 1 && PyTuple_Check(stack[0])) { in _PyObject_CallFunctionVa()
957 result = _PyObject_FastCall(callable, stack, nargs); in _PyObject_CallFunctionVa()
960 for (i = 0; i < nargs; ++i) { in _PyObject_CallFunctionVa()
1160 Py_ssize_t nargs; in object_vacall() local
1171 nargs = 0; in object_vacall()
1177 nargs++; in object_vacall()
1182 if (nargs <= (Py_ssize_t)Py_ARRAY_LENGTH(small_stack)) { in object_vacall()
1186 stack = PyMem_Malloc(nargs * sizeof(stack[0])); in object_vacall()
1193 for (i = 0; i < nargs; ++i) { in object_vacall()
1198 result = _PyObject_FastCall(callable, stack, nargs); in object_vacall()
1275 _PyStack_AsTuple(PyObject *const *stack, Py_ssize_t nargs) in _PyStack_AsTuple() argument
1280 args = PyTuple_New(nargs); in _PyStack_AsTuple()
1285 for (i=0; i < nargs; i++) { in _PyStack_AsTuple()
1295 _PyStack_AsTupleSlice(PyObject *const *stack, Py_ssize_t nargs, in _PyStack_AsTupleSlice() argument
1302 assert(end <= nargs); in _PyStack_AsTupleSlice()
1347 _PyStack_UnpackDict(PyObject *const *args, Py_ssize_t nargs, PyObject *kwargs, in _PyStack_UnpackDict() argument
1356 assert(nargs >= 0); in _PyStack_UnpackDict()
1365 if ((size_t)nargs > PY_SSIZE_T_MAX / sizeof(stack[0]) - (size_t)nkwargs) { in _PyStack_UnpackDict()
1370 stack = PyMem_Malloc((nargs + nkwargs) * sizeof(stack[0])); in _PyStack_UnpackDict()
1383 memcpy(stack, args, nargs * sizeof(stack[0])); in _PyStack_UnpackDict()
1385 kwstack = stack + nargs; in _PyStack_UnpackDict()