Lines Matching defs:args
34 objects_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
43 a = args[0];
47 b = args[1];
154 bool_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
167 a = PyObject_IsTrue(args[0]);
174 b = PyObject_IsTrue(args[1]);
181 c = _PyLong_AsInt(args[2]);
208 char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
232 if (PyBytes_Check(args[0]) && PyBytes_GET_SIZE(args[0]) == 1) {
233 a = PyBytes_AS_STRING(args[0])[0];
235 else if (PyByteArray_Check(args[0]) && PyByteArray_GET_SIZE(args[0]) == 1) {
236 a = PyByteArray_AS_STRING(args[0])[0];
239 _PyArg_BadArgument("char_converter", "argument 1", "a byte string of length 1", args[0]);
245 if (PyBytes_Check(args[1]) && PyBytes_GET_SIZE(args[1]) == 1) {
246 b = PyBytes_AS_STRING(args[1])[0];
248 else if (PyByteArray_Check(args[1]) && PyByteArray_GET_SIZE(args[1]) == 1) {
249 b = PyByteArray_AS_STRING(args[1])[0];
252 _PyArg_BadArgument("char_converter", "argument 2", "a byte string of length 1", args[1]);
258 if (PyBytes_Check(args[2]) && PyBytes_GET_SIZE(args[2]) == 1) {
259 c = PyBytes_AS_STRING(args[2])[0];
261 else if (PyByteArray_Check(args[2]) && PyByteArray_GET_SIZE(args[2]) == 1) {
262 c = PyByteArray_AS_STRING(args[2])[0];
265 _PyArg_BadArgument("char_converter", "argument 3", "a byte string of length 1", args[2]);
271 if (PyBytes_Check(args[3]) && PyBytes_GET_SIZE(args[3]) == 1) {
272 d = PyBytes_AS_STRING(args[3])[0];
274 else if (PyByteArray_Check(args[3]) && PyByteArray_GET_SIZE(args[3]) == 1) {
275 d = PyByteArray_AS_STRING(args[3])[0];
278 _PyArg_BadArgument("char_converter", "argument 4", "a byte string of length 1", args[3]);
284 if (PyBytes_Check(args[4]) && PyBytes_GET_SIZE(args[4]) == 1) {
285 e = PyBytes_AS_STRING(args[4])[0];
287 else if (PyByteArray_Check(args[4]) && PyByteArray_GET_SIZE(args[4]) == 1) {
288 e = PyByteArray_AS_STRING(args[4])[0];
291 _PyArg_BadArgument("char_converter", "argument 5", "a byte string of length 1", args[4]);
297 if (PyBytes_Check(args[5]) && PyBytes_GET_SIZE(args[5]) == 1) {
298 f = PyBytes_AS_STRING(args[5])[0];
300 else if (PyByteArray_Check(args[5]) && PyByteArray_GET_SIZE(args[5]) == 1) {
301 f = PyByteArray_AS_STRING(args[5])[0];
304 _PyArg_BadArgument("char_converter", "argument 6", "a byte string of length 1", args[5]);
310 if (PyBytes_Check(args[6]) && PyBytes_GET_SIZE(args[6]) == 1) {
311 g = PyBytes_AS_STRING(args[6])[0];
313 else if (PyByteArray_Check(args[6]) && PyByteArray_GET_SIZE(args[6]) == 1) {
314 g = PyByteArray_AS_STRING(args[6])[0];
317 _PyArg_BadArgument("char_converter", "argument 7", "a byte string of length 1", args[6]);
323 if (PyBytes_Check(args[7]) && PyBytes_GET_SIZE(args[7]) == 1) {
324 h = PyBytes_AS_STRING(args[7])[0];
326 else if (PyByteArray_Check(args[7]) && PyByteArray_GET_SIZE(args[7]) == 1) {
327 h = PyByteArray_AS_STRING(args[7])[0];
330 _PyArg_BadArgument("char_converter", "argument 8", "a byte string of length 1", args[7]);
336 if (PyBytes_Check(args[8]) && PyBytes_GET_SIZE(args[8]) == 1) {
337 i = PyBytes_AS_STRING(args[8])[0];
339 else if (PyByteArray_Check(args[8]) && PyByteArray_GET_SIZE(args[8]) == 1) {
340 i = PyByteArray_AS_STRING(args[8])[0];
343 _PyArg_BadArgument("char_converter", "argument 9", "a byte string of length 1", args[8]);
349 if (PyBytes_Check(args[9]) && PyBytes_GET_SIZE(args[9]) == 1) {
350 j = PyBytes_AS_STRING(args[9])[0];
352 else if (PyByteArray_Check(args[9]) && PyByteArray_GET_SIZE(args[9]) == 1) {
353 j = PyByteArray_AS_STRING(args[9])[0];
356 _PyArg_BadArgument("char_converter", "argument 10", "a byte string of length 1", args[9]);
362 if (PyBytes_Check(args[10]) && PyBytes_GET_SIZE(args[10]) == 1) {
363 k = PyBytes_AS_STRING(args[10])[0];
365 else if (PyByteArray_Check(args[10]) && PyByteArray_GET_SIZE(args[10]) == 1) {
366 k = PyByteArray_AS_STRING(args[10])[0];
369 _PyArg_BadArgument("char_converter", "argument 11", "a byte string of length 1", args[10]);
375 if (PyBytes_Check(args[11]) && PyBytes_GET_SIZE(args[11]) == 1) {
376 l = PyBytes_AS_STRING(args[11])[0];
378 else if (PyByteArray_Check(args[11]) && PyByteArray_GET_SIZE(args[11]) == 1) {
379 l = PyByteArray_AS_STRING(args[11])[0];
382 _PyArg_BadArgument("char_converter", "argument 12", "a byte string of length 1", args[11]);
388 if (PyBytes_Check(args[12]) && PyBytes_GET_SIZE(args[12]) == 1) {
389 m = PyBytes_AS_STRING(args[12])[0];
391 else if (PyByteArray_Check(args[12]) && PyByteArray_GET_SIZE(args[12]) == 1) {
392 m = PyByteArray_AS_STRING(args[12])[0];
395 _PyArg_BadArgument("char_converter", "argument 13", "a byte string of length 1", args[12]);
401 if (PyBytes_Check(args[13]) && PyBytes_GET_SIZE(args[13]) == 1) {
402 n = PyBytes_AS_STRING(args[13])[0];
404 else if (PyByteArray_Check(args[13]) && PyByteArray_GET_SIZE(args[13]) == 1) {
405 n = PyByteArray_AS_STRING(args[13])[0];
408 _PyArg_BadArgument("char_converter", "argument 14", "a byte string of length 1", args[13]);
431 unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
445 long ival = PyLong_AsLong(args[0]);
467 long ival = PyLong_AsLong(args[1]);
489 unsigned long ival = PyLong_AsUnsignedLongMask(args[2]);
516 short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
528 long ival = PyLong_AsLong(args[0]);
566 unsigned_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
579 if (!_PyLong_UnsignedShort_Converter(args[0], &a)) {
585 if (!_PyLong_UnsignedShort_Converter(args[1], &b)) {
591 c = (unsigned short)PyLong_AsUnsignedLongMask(args[2]);
614 int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
627 a = _PyLong_AsInt(args[0]);
634 b = _PyLong_AsInt(args[1]);
641 if (!PyUnicode_Check(args[2])) {
642 _PyArg_BadArgument("int_converter", "argument 3", "a unicode character", args[2]);
645 if (PyUnicode_READY(args[2])) {
648 if (PyUnicode_GET_LENGTH(args[2]) != 1) {
649 _PyArg_BadArgument("int_converter", "argument 3", "a unicode character", args[2]);
652 c = PyUnicode_READ_CHAR(args[2], 0);
673 unsigned_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
686 if (!_PyLong_UnsignedInt_Converter(args[0], &a)) {
692 if (!_PyLong_UnsignedInt_Converter(args[1], &b)) {
698 c = (unsigned int)PyLong_AsUnsignedLongMask(args[2]);
721 long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
732 a = PyLong_AsLong(args[0]);
756 unsigned_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
769 if (!_PyLong_UnsignedLong_Converter(args[0], &a)) {
775 if (!_PyLong_UnsignedLong_Converter(args[1], &b)) {
781 if (!PyLong_Check(args[2])) {
782 _PyArg_BadArgument("unsigned_long_converter", "argument 3", "int", args[2]);
785 c = PyLong_AsUnsignedLongMask(args[2]);
805 long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
816 a = PyLong_AsLongLong(args[0]);
840 unsigned_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
853 if (!_PyLong_UnsignedLongLong_Converter(args[0], &a)) {
859 if (!_PyLong_UnsignedLongLong_Converter(args[1], &b)) {
865 if (!PyLong_Check(args[2])) {
866 _PyArg_BadArgument("unsigned_long_long_converter", "argument 3", "int", args[2]);
869 c = PyLong_AsUnsignedLongLongMask(args[2]);
890 py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
905 PyObject *iobj = _PyNumber_Index(args[0]);
920 PyObject *iobj = _PyNumber_Index(args[1]);
933 if (!_Py_convert_optional_to_ssize_t(args[2], &c)) {
956 slice_index_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
969 if (!_PyEval_SliceIndex(args[0], &a)) {
975 if (!_PyEval_SliceIndexNotNone(args[1], &b)) {
981 if (!_PyEval_SliceIndex(args[2], &c)) {
1003 size_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1014 if (!_PyLong_Size_t_Converter(args[0], &a)) {
1036 float_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1047 if (PyFloat_CheckExact(args[0])) {
1048 a = (float) (PyFloat_AS_DOUBLE(args[0]));
1052 a = (float) PyFloat_AsDouble(args[0]);
1076 double_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1087 if (PyFloat_CheckExact(args[0])) {
1088 a = PyFloat_AS_DOUBLE(args[0]);
1092 a = PyFloat_AsDouble(args[0]);
1144 str_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1152 if (!_PyArg_ParseStack(args, nargs, "|sys#:str_converter",
1175 str_converter_encoding(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1183 if (!_PyArg_ParseStack(args, nargs, "esetet#:str_converter_encoding",
1211 py_buffer_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1217 if (!_PyArg_ParseStack(args, nargs, "z*w*:py_buffer_converter",
1248 keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1257 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
1258 if (!args) {
1261 a = args[0];
1262 b = args[1];
1281 keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1290 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
1291 if (!args) {
1294 a = args[0];
1295 b = args[1];
1314 keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1325 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
1326 if (!args) {
1329 a = args[0];
1333 if (args[1]) {
1334 b = args[1];
1339 c = args[2];
1360 keywords_opt_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1372 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
1373 if (!args) {
1376 a = args[0];
1380 if (args[1]) {
1381 b = args[1];
1390 if (args[2]) {
1391 c = args[2];
1396 d = args[3];
1417 keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1428 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, argsbuf);
1429 if (!args) {
1432 a = args[0];
1436 if (args[1]) {
1437 b = args[1];
1442 c = args[2];
1462 posonly_keywords(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1471 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, argsbuf);
1472 if (!args) {
1475 a = args[0];
1476 b = args[1];
1495 posonly_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1504 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
1505 if (!args) {
1508 a = args[0];
1509 b = args[1];
1529 posonly_keywords_kwonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1539 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
1540 if (!args) {
1543 a = args[0];
1544 b = args[1];
1545 c = args[2];
1565 posonly_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1577 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 4, 0, argsbuf);
1578 if (!args) {
1581 a = args[0];
1582 b = args[1];
1586 if (args[2]) {
1587 c = args[2];
1592 d = args[3];
1613 posonly_opt_keywords_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1625 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 4, 0, argsbuf);
1626 if (!args) {
1629 a = args[0];
1634 b = args[1];
1639 if (args[2]) {
1640 c = args[2];
1645 d = args[3];
1666 posonly_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1678 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 1, 1, argsbuf);
1679 if (!args) {
1682 a = args[0];
1683 b = args[1];
1687 if (args[2]) {
1688 c = args[2];
1693 d = args[3];
1714 posonly_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1726 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 2, 0, argsbuf);
1727 if (!args) {
1730 a = args[0];
1735 b = args[1];
1740 if (args[2]) {
1741 c = args[2];
1746 d = args[3];
1767 posonly_keywords_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1780 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 2, 1, argsbuf);
1781 if (!args) {
1784 a = args[0];
1785 b = args[1];
1786 c = args[2];
1790 if (args[3]) {
1791 d = args[3];
1796 e = args[4];
1819 posonly_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1832 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 2, 3, 0, argsbuf);
1833 if (!args) {
1836 a = args[0];
1837 b = args[1];
1841 if (args[2]) {
1842 c = args[2];
1851 if (args[3]) {
1852 d = args[3];
1857 e = args[4];
1880 posonly_opt_keywords_opt_kwonly_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1892 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
1893 if (!args) {
1896 a = args[0];
1901 b = args[1];
1906 if (args[2]) {
1907 c = args[2];
1916 d = args[3];
1936 keyword_only_parameter(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1944 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 0, 1, argsbuf);
1945 if (!args) {
1948 a = args[0];
1956 "posonly_vararg($module, a, /, b, *args)\n"
1965 PyObject *args);
1968 posonly_vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1978 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 2, argsbuf);
1979 if (!args) {
1982 a = args[0];
1983 b = args[1];
1984 __clinic_args = args[2];
1993 "vararg_and_posonly($module, a, /, *args)\n"
2001 vararg_and_posonly_impl(PyObject *module, PyObject *a, PyObject *args);
2004 vararg_and_posonly(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
2013 a = args[0];
2019 PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[1 + i]));
2029 "vararg($module, /, a, *args)\n"
2037 vararg_impl(PyObject *module, PyObject *a, PyObject *args);
2040 vararg(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2049 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
2050 if (!args) {
2053 a = args[0];
2054 __clinic_args = args[1];
2063 "vararg_with_default($module, /, a, *args, b=False)\n"
2071 vararg_with_default_impl(PyObject *module, PyObject *a, PyObject *args,
2075 vararg_with_default(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2086 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
2087 if (!args) {
2090 a = args[0];
2091 __clinic_args = args[1];
2095 b = PyObject_IsTrue(args[2]);
2108 "vararg_with_only_defaults($module, /, *args, b=None)\n"
2116 vararg_with_only_defaults_impl(PyObject *module, PyObject *args, PyObject *b);
2119 vararg_with_only_defaults(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2129 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 0, 0, 0, 0, argsbuf);
2130 if (!args) {
2133 __clinic_args = args[0];
2137 b = args[1];
2160 gh_32092_oob(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2173 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 2, 2, 0, 2, argsbuf);
2174 if (!args) {
2177 pos1 = args[0];
2178 pos2 = args[1];
2179 varargs = args[2];
2183 if (args[3]) {
2184 kw1 = args[3];
2189 kw2 = args[4];
2199 "gh_32092_kw_pass($module, /, pos, *args, kw=None)\n"
2202 "Proof-of-concept of GH-32092 keyword args passing bug.");
2208 gh_32092_kw_pass_impl(PyObject *module, PyObject *pos, PyObject *args,
2212 gh_32092_kw_pass(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2223 args = _PyArg_UnpackKeywordsWithVararg(args, nargs, NULL, kwnames, &_parser, 1, 1, 0, 1, argsbuf);
2224 if (!args) {
2227 pos = args[0];
2228 __clinic_args = args[1];
2232 kw = args[2];
2242 "gh_99233_refcount($module, /, *args)\n"
2251 gh_99233_refcount_impl(PyObject *module, PyObject *args);
2254 gh_99233_refcount(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
2267 PyTuple_SET_ITEM(__clinic_args, i, Py_NewRef(args[0 + i]));
2289 gh_99240_double_free(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
2295 if (!_PyArg_ParseStack(args, nargs, "eses:gh_99240_double_free",