diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-01-16 17:18:53 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-01-16 17:18:53 +0100 |
commit | 7542c621d4273f5ea075c1127e5dbdb33ff6677f (patch) | |
tree | a558a5b3ab9675a0dea108f92d7c5646314f1ba5 /Tools/gdb | |
parent | 6c812b4a4ef712e449e029dc7253e34c29ec3cff (diff) | |
download | cpython-7542c621d4273f5ea075c1127e5dbdb33ff6677f.tar.gz |
Optimize _PyCFunction_FastCallKeywords()
Issue #29259: Write fast path in _PyCFunction_FastCallKeywords() for
METH_FASTCALL, avoid the creation of a temporary dictionary for keyword
arguments.
Cleanup also _PyCFunction_FastCallDict():
* Don't dereference func before checking that it's not NULL
* Move code to raise the "no keyword argument" exception into a new
no_keyword_error label.
Update python-gdb.py for the change.
Diffstat (limited to 'Tools/gdb')
-rwxr-xr-x | Tools/gdb/libpython.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py index cc1afbe16d..88fb0aa7b0 100755 --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1518,7 +1518,8 @@ class Frame(object): except RuntimeError: return 'PyCFunction invocation (unable to read "func")' - elif caller == '_PyCFunction_FastCallDict': + elif caller in {'_PyCFunction_FastCallDict', + '_PyCFunction_FastCallKeywords'}: try: func = older._gdbframe.read_var('func_obj') return str(func) |