Repository navigation
Commit 9a7c32b
gh-136681: Reduce the size of _PyArg_Parser
Narrow pos, min, max and is_kwtuple_owned, which are small counts, and
remove custom_msg: it is only needed to report a conversion error, and
can then be looked up in the format string. Keep format, keywords and
fname first, so that existing positional initializers still work.
_PyArg_Parser shrinks from 72 to 48 bytes on 64-bit platforms.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 5169a7a commit 9a7c32b
2 files changed
Lines changed: 24 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 28 | | |
35 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2045 | 2045 | | |
2046 | 2046 | | |
2047 | 2047 | | |
2048 | | - | |
2049 | | - | |
| 2048 | + | |
2050 | 2049 | | |
2051 | | - | |
2052 | | - | |
2053 | 2050 | | |
2054 | 2051 | | |
2055 | 2052 | | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | 2053 | | |
2064 | 2054 | | |
2065 | 2055 | | |
| |||
2118 | 2108 | | |
2119 | 2109 | | |
2120 | 2110 | | |
2121 | | - | |
2122 | 2111 | | |
2123 | 2112 | | |
2124 | 2113 | | |
| |||
2153 | 2142 | | |
2154 | 2143 | | |
2155 | 2144 | | |
2156 | | - | |
2157 | 2145 | | |
2158 | 2146 | | |
2159 | 2147 | | |
2160 | 2148 | | |
2161 | 2149 | | |
2162 | 2150 | | |
2163 | 2151 | | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
2164 | 2156 | | |
2165 | 2157 | | |
2166 | | - | |
| 2158 | + | |
2167 | 2159 | | |
2168 | 2160 | | |
2169 | 2161 | | |
2170 | 2162 | | |
2171 | | - | |
| 2163 | + | |
2172 | 2164 | | |
2173 | 2165 | | |
2174 | 2166 | | |
| |||
2206 | 2198 | | |
2207 | 2199 | | |
2208 | 2200 | | |
2209 | | - | |
| 2201 | + | |
2210 | 2202 | | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
| 2203 | + | |
| 2204 | + | |
2214 | 2205 | | |
2215 | 2206 | | |
2216 | 2207 | | |
| |||
2243 | 2234 | | |
2244 | 2235 | | |
2245 | 2236 | | |
2246 | | - | |
2247 | 2237 | | |
2248 | 2238 | | |
2249 | 2239 | | |
| |||
2412 | 2402 | | |
2413 | 2403 | | |
2414 | 2404 | | |
2415 | | - | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
2416 | 2414 | | |
2417 | 2415 | | |
2418 | 2416 | | |
| |||
0 commit comments