diff options
author | Raymond Hettinger <python@rcn.com> | 2003-01-04 00:37:53 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-01-04 00:37:53 (GMT) |
commit | bf43f8af3500dfd98a46551942bf4a7ae4dad976 (patch) | |
tree | e2fc8a6e8453ba8aaffa236275bc6fd6c5865202 /Misc | |
parent | 3919571f82079cb92c7783ab74a1823f8fdbf3eb (diff) | |
download | cpython-bf43f8af3500dfd98a46551942bf4a7ae4dad976.zip cpython-bf43f8af3500dfd98a46551942bf4a7ae4dad976.tar.gz cpython-bf43f8af3500dfd98a46551942bf4a7ae4dad976.tar.bz2 |
SF Patch #661440: Refactor and streamline PyCFunction_Call
Refactor code in PyCFunction_Call giving a modest (tiny) speed boost,
a slight improvement in semantics (now detects invalid flag combinations),
and (arguably) improved clarity (making it blindingly clear which flag
combinations are allowed). All this comes at a cost of a few lines of
code duplication.
* Folded test for METH_KEYWORDS into the switch/case.
* Deferred testing for an empty dictionary until when and where needed.
* Make a similar deferral for filling the "size" variable.
* Inverted the dictionary test so that the common case falls though
instead of making a jump.
Diffstat (limited to 'Misc')
0 files changed, 0 insertions, 0 deletions