mirror of
https://github.com/python/cpython.git
synced 2025-10-30 05:01:30 +00:00
[3.14] gh-91048: Reorder result tuple of parse_code_object (GH-134898) (#134956)
* gh-91048: Reorder result tuple of parse_code_object (GH-134898)
Reorder result tuple of parse_code_object
The standard followed by APIs like pstat.Stats is to take a file, line,
function triplet. The parse_code_object function (and callers exposing
this in Python like RemoteUnwinder.get_stack_trace) return function,
file, line triplets which requires the caller to reorder these when
using it in classes like pstat.Stats.
(cherry picked from commit 8e8786f898)
Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
* Reorder asyncio
---------
Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
77c4b5d413
commit
f303532857
2 changed files with 42 additions and 42 deletions
|
|
@ -1562,9 +1562,9 @@ parse_code_object(RemoteUnwinderObject *unwinder,
|
|||
|
||||
Py_INCREF(meta->func_name);
|
||||
Py_INCREF(meta->file_name);
|
||||
PyTuple_SET_ITEM(tuple, 0, meta->func_name);
|
||||
PyTuple_SET_ITEM(tuple, 1, meta->file_name);
|
||||
PyTuple_SET_ITEM(tuple, 2, lineno);
|
||||
PyTuple_SET_ITEM(tuple, 0, meta->file_name);
|
||||
PyTuple_SET_ITEM(tuple, 1, lineno);
|
||||
PyTuple_SET_ITEM(tuple, 2, meta->func_name);
|
||||
|
||||
*result = tuple;
|
||||
return 0;
|
||||
|
|
@ -2921,4 +2921,4 @@ PyMODINIT_FUNC
|
|||
PyInit__remote_debugging(void)
|
||||
{
|
||||
return PyModuleDef_Init(&remote_debugging_module);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue