mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.13] gh-142595: Amend be5e0dcded (fix NULL pointer dereference) (GH-142775) (GH-142789)
(cherry picked from commit 15a9762500)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
c32a4c14fd
commit
4480f5b661
1 changed files with 3 additions and 2 deletions
|
|
@ -5922,8 +5922,9 @@ _decimal_exec(PyObject *m)
|
|||
|
||||
/* DecimalTuple */
|
||||
ASSIGN_PTR(collections, PyImport_ImportModule("collections"));
|
||||
obj = PyObject_CallMethod(collections, "namedtuple", "(ss)", "DecimalTuple",
|
||||
"sign digits exponent");
|
||||
ASSIGN_PTR(obj, PyObject_CallMethod(collections, "namedtuple", "(ss)",
|
||||
"DecimalTuple",
|
||||
"sign digits exponent"));
|
||||
if (!PyType_Check(obj)) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"type is expected from namedtuple call");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue