Home | History | Annotate | Download | only in Objects

Lines Matching refs:nargs

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