mirror of
https://github.com/python/cpython.git
synced 2025-07-31 23:23:11 +00:00
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.
This commit is contained in:
parent
15f94596b6
commit
7fc252adfb
2 changed files with 134 additions and 38 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue