mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)
This commit is contained in:
parent
ff4e53cb74
commit
59ea0f523e
13 changed files with 33 additions and 32 deletions
|
|
@ -244,8 +244,7 @@ _opcode_get_nb_ops_impl(PyObject *module)
|
|||
}
|
||||
#define ADD_NB_OP(NUM, STR) \
|
||||
do { \
|
||||
PyObject *pair = Py_BuildValue( \
|
||||
"NN", PyUnicode_FromString(#NUM), PyUnicode_FromString(STR)); \
|
||||
PyObject *pair = Py_BuildValue("ss", #NUM, STR); \
|
||||
if (pair == NULL) { \
|
||||
Py_DECREF(list); \
|
||||
return NULL; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue