Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(27635)

Side by Side Diff: Python/getargs.c

Issue 29029: Faster positional arguments parsing in PyArg_ParseTupleAndKeywords
Patch Set: Created 2 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* New getargs implementation */ 2 /* New getargs implementation */
3 3
4 #include "Python.h" 4 #include "Python.h"
5 5
6 #include <ctype.h> 6 #include <ctype.h>
7 7
8 8
9 #ifdef __cplusplus 9 #ifdef __cplusplus
10 extern "C" { 10 extern "C" {
(...skipping 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 } 1543 }
1544 1544
1545 #define IS_END_OF_FORMAT(c) (c == '\0' || c == ';' || c == ':') 1545 #define IS_END_OF_FORMAT(c) (c == '\0' || c == ';' || c == ':')
1546 1546
1547 static int 1547 static int
1548 vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format, 1548 vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
1549 char **kwlist, va_list *p_va, int flags) 1549 char **kwlist, va_list *p_va, int flags)
1550 { 1550 {
1551 char msgbuf[512]; 1551 char msgbuf[512];
1552 int levels[32]; 1552 int levels[32];
1553 const char *fname, *msg, *custom_msg, *keyword; 1553 const char *fname, *msg, *custom_msg;
1554 int min = INT_MAX; 1554 int min = INT_MAX;
1555 int max = INT_MAX; 1555 int max = INT_MAX;
1556 int i, pos, len; 1556 int i, pos, len;
1557 int skip = 0; 1557 int skip = 0;
1558 Py_ssize_t nargs, nkwargs; 1558 Py_ssize_t nargs, nkwargs;
1559 PyObject *current_arg; 1559 PyObject *current_arg;
1560 freelistentry_t static_entries[STATIC_FREELIST_ENTRIES]; 1560 freelistentry_t static_entries[STATIC_FREELIST_ENTRIES];
1561 freelist_t freelist; 1561 freelist_t freelist;
1562 1562
1563 freelist.entries = static_entries; 1563 freelist.entries = static_entries;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1611 (fname == NULL) ? "function" : fname, 1611 (fname == NULL) ? "function" : fname,
1612 (fname == NULL) ? "" : "()", 1612 (fname == NULL) ? "" : "()",
1613 len, 1613 len,
1614 (len == 1) ? "" : "s", 1614 (len == 1) ? "" : "s",
1615 nargs + nkwargs); 1615 nargs + nkwargs);
1616 return cleanreturn(0, &freelist); 1616 return cleanreturn(0, &freelist);
1617 } 1617 }
1618 1618
1619 /* convert tuple args and keyword args in same loop, using kwlist to drive p rocess */ 1619 /* convert tuple args and keyword args in same loop, using kwlist to drive p rocess */
1620 for (i = 0; i < len; i++) { 1620 for (i = 0; i < len; i++) {
1621 keyword = kwlist[i];
1622 if (*format == '|') { 1621 if (*format == '|') {
1623 if (min != INT_MAX) { 1622 if (min != INT_MAX) {
1624 PyErr_SetString(PyExc_SystemError, 1623 PyErr_SetString(PyExc_SystemError,
1625 "Invalid format string (| specified twice)"); 1624 "Invalid format string (| specified twice)");
1626 return cleanreturn(0, &freelist); 1625 return cleanreturn(0, &freelist);
1627 } 1626 }
1628 1627
1629 min = i; 1628 min = i;
1630 format++; 1629 format++;
1631 1630
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 return cleanreturn(0, &freelist); 1664 return cleanreturn(0, &freelist);
1666 } 1665 }
1667 } 1666 }
1668 if (IS_END_OF_FORMAT(*format)) { 1667 if (IS_END_OF_FORMAT(*format)) {
1669 PyErr_Format(PyExc_SystemError, 1668 PyErr_Format(PyExc_SystemError,
1670 "More keyword list entries (%d) than " 1669 "More keyword list entries (%d) than "
1671 "format specifiers (%d)", len, i); 1670 "format specifiers (%d)", len, i);
1672 return cleanreturn(0, &freelist); 1671 return cleanreturn(0, &freelist);
1673 } 1672 }
1674 if (!skip) { 1673 if (!skip) {
1675 current_arg = NULL; 1674 if (i < nargs) {
1676 if (nkwargs && i >= pos) { 1675 current_arg = PyTuple_GET_ITEM(args, i);
1677 current_arg = PyDict_GetItemString(kwargs, keyword);
1678 if (!current_arg && PyErr_Occurred()) {
1679 return cleanreturn(0, &freelist);
1680 }
1681 } 1676 }
1682 if (current_arg) { 1677 else if (nkwargs && i >= pos) {
1683 --nkwargs; 1678 current_arg = PyDict_GetItemString(kwargs, kwlist[i]);
1684 if (i < nargs) { 1679 if (current_arg)
1685 /* arg present in tuple and in dict */ 1680 --nkwargs;
1686 PyErr_Format(PyExc_TypeError,
1687 "Argument given by name ('%s') "
1688 "and position (%d)",
1689 keyword, i+1);
1690 return cleanreturn(0, &freelist);
1691 }
1692 } 1681 }
1693 else if (i < nargs) 1682 else {
1694 current_arg = PyTuple_GET_ITEM(args, i); 1683 current_arg = NULL;
1684 }
1695 1685
1696 if (current_arg) { 1686 if (current_arg) {
1697 msg = convertitem(current_arg, &format, p_va, flags, 1687 msg = convertitem(current_arg, &format, p_va, flags,
1698 levels, msgbuf, sizeof(msgbuf), &freelist); 1688 levels, msgbuf, sizeof(msgbuf), &freelist);
1699 if (msg) { 1689 if (msg) {
1700 seterror(i+1, msg, levels, fname, custom_msg); 1690 seterror(i+1, msg, levels, fname, custom_msg);
1701 return cleanreturn(0, &freelist); 1691 return cleanreturn(0, &freelist);
1702 } 1692 }
1703 continue; 1693 continue;
1704 } 1694 }
1705 1695
1706 if (i < min) { 1696 if (i < min) {
1707 if (i < pos) { 1697 if (i < pos) {
1708 assert (min == INT_MAX); 1698 assert (min == INT_MAX);
1709 assert (max == INT_MAX); 1699 assert (max == INT_MAX);
1710 skip = 1; 1700 skip = 1;
1711 /* At that moment we still don't know the minimal and 1701 /* At that moment we still don't know the minimal and
1712 * the maximal numbers of positional arguments. Raising 1702 * the maximal numbers of positional arguments. Raising
1713 * an exception is deferred until we encounter | and $ 1703 * an exception is deferred until we encounter | and $
1714 * or the end of the format. */ 1704 * or the end of the format. */
1715 } 1705 }
1716 else { 1706 else {
1717 PyErr_Format(PyExc_TypeError, "Required argument " 1707 PyErr_Format(PyExc_TypeError, "Required argument "
1718 "'%s' (pos %d) not found", 1708 "'%s' (pos %d) not found",
1719 keyword, i+1); 1709 kwlist[i], i+1);
1720 return cleanreturn(0, &freelist); 1710 return cleanreturn(0, &freelist);
1721 } 1711 }
1722 } 1712 }
1723 /* current code reports success when all required args 1713 /* current code reports success when all required args
1724 * fulfilled and no keyword args left, with no further 1714 * fulfilled and no keyword args left, with no further
1725 * validation. XXX Maybe skip this in debug build ? 1715 * validation. XXX Maybe skip this in debug build ?
1726 */ 1716 */
1727 if (!nkwargs && !skip) { 1717 if (!nkwargs && !skip) {
1728 return cleanreturn(1, &freelist); 1718 return cleanreturn(1, &freelist);
1729 } 1719 }
(...skipping 18 matching lines...) Expand all
1748 return cleanreturn(0, &freelist); 1738 return cleanreturn(0, &freelist);
1749 } 1739 }
1750 1740
1751 if (!IS_END_OF_FORMAT(*format) && (*format != '|') && (*format != '$')) { 1741 if (!IS_END_OF_FORMAT(*format) && (*format != '|') && (*format != '$')) {
1752 PyErr_Format(PyExc_SystemError, 1742 PyErr_Format(PyExc_SystemError,
1753 "more argument specifiers than keyword list entries " 1743 "more argument specifiers than keyword list entries "
1754 "(remaining format:'%s')", format); 1744 "(remaining format:'%s')", format);
1755 return cleanreturn(0, &freelist); 1745 return cleanreturn(0, &freelist);
1756 } 1746 }
1757 1747
1758 /* make sure there are no extraneous keyword arguments */
1759 if (nkwargs > 0) { 1748 if (nkwargs > 0) {
1760 PyObject *key, *value; 1749 PyObject *key;
1761 Py_ssize_t pos = 0; 1750 Py_ssize_t j;
1762 while (PyDict_Next(kwargs, &pos, &key, &value)) { 1751 /* make sure there are no arguments given by name and position */
1752 for (i = pos; i < nargs; i++) {
1753 current_arg = PyDict_GetItemString(kwargs, kwlist[i]);
1754 if (current_arg) {
1755 /* arg present in tuple and in dict */
1756 PyErr_Format(PyExc_TypeError,
1757 "Argument given by name ('%s') "
1758 "and position (%d)",
1759 kwlist[i], i+1);
1760 return cleanreturn(0, &freelist);
1761 }
1762 }
1763 /* make sure there are no extraneous keyword arguments */
1764 j = 0;
1765 while (PyDict_Next(kwargs, &j, &key, NULL)) {
1763 int match = 0; 1766 int match = 0;
1764 if (!PyUnicode_Check(key)) { 1767 if (!PyUnicode_Check(key)) {
1765 PyErr_SetString(PyExc_TypeError, 1768 PyErr_SetString(PyExc_TypeError,
1766 "keywords must be strings"); 1769 "keywords must be strings");
1767 return cleanreturn(0, &freelist); 1770 return cleanreturn(0, &freelist);
1768 } 1771 }
1769 for (i = 0; i < len; i++) { 1772 for (i = pos; i < len; i++) {
1770 if (*kwlist[i] && _PyUnicode_EqualToASCIIString(key, kwlist[i])) { 1773 if (_PyUnicode_EqualToASCIIString(key, kwlist[i])) {
1771 match = 1; 1774 match = 1;
1772 break; 1775 break;
1773 } 1776 }
1774 } 1777 }
1775 if (!match) { 1778 if (!match) {
1776 PyErr_Format(PyExc_TypeError, 1779 PyErr_Format(PyExc_TypeError,
1777 "'%U' is an invalid keyword " 1780 "'%U' is an invalid keyword "
1778 "argument for this function", 1781 "argument for this function",
1779 key); 1782 key);
1780 return cleanreturn(0, &freelist); 1783 return cleanreturn(0, &freelist);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1908 return 1; 1911 return 1;
1909 } 1912 }
1910 1913
1911 static void 1914 static void
1912 parser_clear(struct _PyArg_Parser *parser) 1915 parser_clear(struct _PyArg_Parser *parser)
1913 { 1916 {
1914 Py_CLEAR(parser->kwtuple); 1917 Py_CLEAR(parser->kwtuple);
1915 } 1918 }
1916 1919
1917 static PyObject* 1920 static PyObject*
1918 find_keyword(PyObject *kwnames, PyObject **kwstack, PyObject *key) 1921 find_keyword(PyObject *kwargs, PyObject *kwnames, PyObject **kwstack, PyObject * key)
1919 { 1922 {
1920 Py_ssize_t i, nkwargs; 1923 Py_ssize_t i, nkwargs;
1921 1924
1925 if (kwargs != NULL) {
1926 return PyDict_GetItem(kwargs, key);
1927 }
1922 nkwargs = PyTuple_GET_SIZE(kwnames); 1928 nkwargs = PyTuple_GET_SIZE(kwnames);
1923 for (i=0; i < nkwargs; i++) { 1929 for (i=0; i < nkwargs; i++) {
1924 PyObject *kwname = PyTuple_GET_ITEM(kwnames, i); 1930 PyObject *kwname = PyTuple_GET_ITEM(kwnames, i);
1925 1931
1926 /* ptr==ptr should match in most cases since keyword keys 1932 /* ptr==ptr should match in most cases since keyword keys
1927 should be interned strings */ 1933 should be interned strings */
1928 if (kwname == key) { 1934 if (kwname == key) {
1929 return kwstack[i]; 1935 return kwstack[i];
1930 } 1936 }
1931 if (!PyUnicode_Check(kwname)) { 1937 if (!PyUnicode_Check(kwname)) {
1932 /* ignore non-string keyword keys: 1938 /* ignore non-string keyword keys:
1933 an error will be raised above */ 1939 an error will be raised below */
1934 continue; 1940 continue;
1935 } 1941 }
1936 if (_PyUnicode_EQ(kwname, key)) { 1942 if (_PyUnicode_EQ(kwname, key)) {
1937 return kwstack[i]; 1943 return kwstack[i];
1938 } 1944 }
1939 } 1945 }
1940 return NULL; 1946 return NULL;
1941 } 1947 }
1942 1948
1943 static int 1949 static int
(...skipping 13 matching lines...) Expand all
1957 PyObject *current_arg; 1963 PyObject *current_arg;
1958 freelistentry_t static_entries[STATIC_FREELIST_ENTRIES]; 1964 freelistentry_t static_entries[STATIC_FREELIST_ENTRIES];
1959 freelist_t freelist; 1965 freelist_t freelist;
1960 PyObject **kwstack = NULL; 1966 PyObject **kwstack = NULL;
1961 1967
1962 freelist.entries = static_entries; 1968 freelist.entries = static_entries;
1963 freelist.first_available = 0; 1969 freelist.first_available = 0;
1964 freelist.entries_malloced = 0; 1970 freelist.entries_malloced = 0;
1965 1971
1966 assert(kwargs == NULL || PyDict_Check(kwargs)); 1972 assert(kwargs == NULL || PyDict_Check(kwargs));
1967 assert((kwargs != NULL || kwnames != NULL) 1973 assert(kwargs == NULL || kwnames == NULL);
1968 || (kwargs == NULL && kwnames == NULL));
1969 assert(p_va != NULL); 1974 assert(p_va != NULL);
1970 1975
1971 if (parser == NULL) { 1976 if (parser == NULL) {
1972 PyErr_BadInternalCall(); 1977 PyErr_BadInternalCall();
1973 return 0; 1978 return 0;
1974 } 1979 }
1975 1980
1976 if (kwnames != NULL && !PyTuple_Check(kwnames)) { 1981 if (kwnames != NULL && !PyTuple_Check(kwnames)) {
1977 PyErr_BadInternalCall(); 1982 PyErr_BadInternalCall();
1978 return 0; 1983 return 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 PyErr_Format(PyExc_TypeError, 2024 PyErr_Format(PyExc_TypeError,
2020 "Function takes %s %d positional arguments (%d given)", 2025 "Function takes %s %d positional arguments (%d given)",
2021 (parser->min != INT_MAX) ? "at most" : "exactly", 2026 (parser->min != INT_MAX) ? "at most" : "exactly",
2022 parser->max, nargs); 2027 parser->max, nargs);
2023 return cleanreturn(0, &freelist); 2028 return cleanreturn(0, &freelist);
2024 } 2029 }
2025 2030
2026 format = parser->format; 2031 format = parser->format;
2027 /* convert tuple args and keyword args in same loop, using kwtuple to drive process */ 2032 /* convert tuple args and keyword args in same loop, using kwtuple to drive process */
2028 for (i = 0; i < len; i++) { 2033 for (i = 0; i < len; i++) {
2029 keyword = (i >= pos) ? PyTuple_GET_ITEM(kwtuple, i - pos) : NULL;
2030 if (*format == '|') { 2034 if (*format == '|') {
2031 format++; 2035 format++;
2032 } 2036 }
2033 if (*format == '$') { 2037 if (*format == '$') {
2034 format++; 2038 format++;
2035 } 2039 }
2036 assert(!IS_END_OF_FORMAT(*format)); 2040 assert(!IS_END_OF_FORMAT(*format));
2037 2041
2038 current_arg = NULL; 2042 if (i < nargs) {
2039 if (nkwargs && i >= pos) { 2043 current_arg = args[i];
2040 if (kwargs != NULL) {
2041 current_arg = PyDict_GetItem(kwargs, keyword);
2042 if (!current_arg && PyErr_Occurred()) {
2043 return cleanreturn(0, &freelist);
2044 }
2045 }
2046 else {
2047 current_arg = find_keyword(kwnames, kwstack, keyword);
2048 }
2049 } 2044 }
2050 if (current_arg) { 2045 else if (nkwargs && i >= pos) {
2051 --nkwargs; 2046 keyword = PyTuple_GET_ITEM(kwtuple, i - pos);
2052 if (i < nargs) { 2047 current_arg = find_keyword(kwargs, kwnames, kwstack, keyword);
2053 /* arg present in tuple and in dict */ 2048 if (current_arg)
2054 PyErr_Format(PyExc_TypeError, 2049 --nkwargs;
2055 "Argument given by name ('%U') "
2056 "and position (%d)",
2057 keyword, i+1);
2058 return cleanreturn(0, &freelist);
2059 }
2060 } 2050 }
2061 else if (i < nargs) { 2051 else {
2062 current_arg = args[i]; 2052 current_arg = NULL;
2063 } 2053 }
2064 2054
2065 if (current_arg) { 2055 if (current_arg) {
2066 msg = convertitem(current_arg, &format, p_va, flags, 2056 msg = convertitem(current_arg, &format, p_va, flags,
2067 levels, msgbuf, sizeof(msgbuf), &freelist); 2057 levels, msgbuf, sizeof(msgbuf), &freelist);
2068 if (msg) { 2058 if (msg) {
2069 seterror(i+1, msg, levels, parser->fname, parser->custom_msg); 2059 seterror(i+1, msg, levels, parser->fname, parser->custom_msg);
2070 return cleanreturn(0, &freelist); 2060 return cleanreturn(0, &freelist);
2071 } 2061 }
2072 continue; 2062 continue;
2073 } 2063 }
2074 2064
2075 if (i < parser->min) { 2065 if (i < parser->min) {
2076 /* Less arguments than required */ 2066 /* Less arguments than required */
2077 if (i < pos) { 2067 if (i < pos) {
2068 Py_ssize_t min = Py_MIN(pos, parser->min);
2078 PyErr_Format(PyExc_TypeError, 2069 PyErr_Format(PyExc_TypeError,
2079 "Function takes %s %d positional arguments" 2070 "Function takes %s %d positional arguments"
2080 " (%d given)", 2071 " (%d given)",
2081 (Py_MIN(pos, parser->min) < parser->max) ? "at leas t" : "exactly", 2072 min < parser->max ? "at least" : "exactly",
2082 Py_MIN(pos, parser->min), nargs); 2073 min, nargs);
2083 } 2074 }
2084 else { 2075 else {
2076 keyword = PyTuple_GET_ITEM(kwtuple, i - pos);
2085 PyErr_Format(PyExc_TypeError, "Required argument " 2077 PyErr_Format(PyExc_TypeError, "Required argument "
2086 "'%U' (pos %d) not found", 2078 "'%U' (pos %d) not found",
2087 keyword, i+1); 2079 keyword, i+1);
2088 } 2080 }
2089 return cleanreturn(0, &freelist); 2081 return cleanreturn(0, &freelist);
2090 } 2082 }
2091 /* current code reports success when all required args 2083 /* current code reports success when all required args
2092 * fulfilled and no keyword args left, with no further 2084 * fulfilled and no keyword args left, with no further
2093 * validation. XXX Maybe skip this in debug build ? 2085 * validation. XXX Maybe skip this in debug build ?
2094 */ 2086 */
2095 if (!nkwargs) { 2087 if (!nkwargs) {
2096 return cleanreturn(1, &freelist); 2088 return cleanreturn(1, &freelist);
2097 } 2089 }
2098 2090
2099 /* We are into optional args, skip thru to any remaining 2091 /* We are into optional args, skip thru to any remaining
2100 * keyword args */ 2092 * keyword args */
2101 msg = skipitem(&format, p_va, flags); 2093 msg = skipitem(&format, p_va, flags);
2102 assert(msg == NULL); 2094 assert(msg == NULL);
2103 } 2095 }
2104 2096
2105 assert(IS_END_OF_FORMAT(*format) || (*format == '|') || (*format == '$')); 2097 assert(IS_END_OF_FORMAT(*format) || (*format == '|') || (*format == '$'));
2106 2098
2107 /* make sure there are no extraneous keyword arguments */
2108 if (nkwargs > 0) { 2099 if (nkwargs > 0) {
2109 if (kwargs != NULL) { 2100 Py_ssize_t j;
2110 PyObject *key, *value; 2101 /* make sure there are no arguments given by name and position */
2111 Py_ssize_t pos = 0; 2102 for (i = pos; i < nargs; i++) {
2112 while (PyDict_Next(kwargs, &pos, &key, &value)) { 2103 keyword = PyTuple_GET_ITEM(kwtuple, i - pos);
2113 int match; 2104 current_arg = find_keyword(kwargs, kwnames, kwstack, keyword);
2114 if (!PyUnicode_Check(key)) { 2105 if (current_arg) {
2115 PyErr_SetString(PyExc_TypeError, 2106 /* arg present in tuple and in dict */
2116 "keywords must be strings"); 2107 PyErr_Format(PyExc_TypeError,
2117 return cleanreturn(0, &freelist); 2108 "Argument given by name ('%U') "
2118 } 2109 "and position (%d)",
2119 match = PySequence_Contains(kwtuple, key); 2110 keyword, i+1);
2120 if (match <= 0) { 2111 return cleanreturn(0, &freelist);
2121 if (!match) {
2122 PyErr_Format(PyExc_TypeError,
2123 "'%U' is an invalid keyword "
2124 "argument for this function",
2125 key);
2126 }
2127 return cleanreturn(0, &freelist);
2128 }
2129 } 2112 }
2130 } 2113 }
2131 else { 2114 /* make sure there are no extraneous keyword arguments */
2132 Py_ssize_t j, nkwargs; 2115 j = 0;
2116 while (1) {
2117 int match;
2118 if (kwargs != NULL) {
2119 if (!PyDict_Next(kwargs, &j, &keyword, NULL))
2120 break;
2121 }
2122 else {
2123 if (j >= PyTuple_GET_SIZE(kwnames))
2124 break;
2125 keyword = PyTuple_GET_ITEM(kwnames, j);
2126 j++;
2127 }
2133 2128
2134 nkwargs = PyTuple_GET_SIZE(kwnames); 2129 if (!PyUnicode_Check(keyword)) {
2135 for (j=0; j < nkwargs; j++) { 2130 PyErr_SetString(PyExc_TypeError,
2136 PyObject *key = PyTuple_GET_ITEM(kwnames, j); 2131 "keywords must be strings");
2137 int match; 2132 return cleanreturn(0, &freelist);
2138 2133 }
2139 if (!PyUnicode_Check(key)) { 2134 match = PySequence_Contains(kwtuple, keyword);
2140 PyErr_SetString(PyExc_TypeError, 2135 if (match <= 0) {
2141 "keywords must be strings"); 2136 if (!match) {
2142 return cleanreturn(0, &freelist); 2137 PyErr_Format(PyExc_TypeError,
2138 "'%U' is an invalid keyword "
2139 "argument for this function",
2140 keyword);
2143 } 2141 }
2144 2142 return cleanreturn(0, &freelist);
2145 match = PySequence_Contains(kwtuple, key);
2146 if (match <= 0) {
2147 if (!match) {
2148 PyErr_Format(PyExc_TypeError,
2149 "'%U' is an invalid keyword "
2150 "argument for this function",
2151 key);
2152 }
2153 return cleanreturn(0, &freelist);
2154 }
2155 } 2143 }
2156 } 2144 }
2157 } 2145 }
2158 2146
2159 return cleanreturn(1, &freelist); 2147 return cleanreturn(1, &freelist);
2160 } 2148 }
2161 2149
2162 static int 2150 static int
2163 vgetargskeywordsfast(PyObject *args, PyObject *keywords, 2151 vgetargskeywordsfast(PyObject *args, PyObject *keywords,
2164 struct _PyArg_Parser *parser, va_list *p_va, int flags) 2152 struct _PyArg_Parser *parser, va_list *p_va, int flags)
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 s->next = NULL; 2412 s->next = NULL;
2425 parser_clear(s); 2413 parser_clear(s);
2426 s = tmp; 2414 s = tmp;
2427 } 2415 }
2428 static_arg_parsers = NULL; 2416 static_arg_parsers = NULL;
2429 } 2417 }
2430 2418
2431 #ifdef __cplusplus 2419 #ifdef __cplusplus
2432 }; 2420 };
2433 #endif 2421 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+