mirror of
https://github.com/python/cpython.git
synced 2026-04-14 15:50:50 +00:00
GH-145247: Use _PyTuple_FromPair in Parser and Python (#145842)
Use _PyTuple_FromPair in Parser and Python
This commit is contained in:
parent
f062014d38
commit
d19de375a2
8 changed files with 16 additions and 11 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "Python.h"
|
||||
#include "errcode.h"
|
||||
#include "internal/pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION
|
||||
#include "internal/pycore_tuple.h" // _PyTuple_FromPair
|
||||
#include "../Parser/lexer/state.h"
|
||||
#include "../Parser/lexer/lexer.h"
|
||||
#include "../Parser/tokenizer/tokenizer.h"
|
||||
|
|
@ -164,7 +165,7 @@ _tokenizer_error(tokenizeriterobject *it)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
value = PyTuple_Pack(2, errstr, tmp);
|
||||
value = _PyTuple_FromPair(errstr, tmp);
|
||||
if (!value) {
|
||||
result = -1;
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue