Skip to content

Commit 8b3c2e5

Browse files
committed
review remove private API usage for PyObject_New
1 parent 84f0a04 commit 8b3c2e5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Modules/_functoolsmodule.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ calculates ((((1 + 2) + 3) + 4) + 5).
953953
static PyObject *
954954
_functools_reduce_impl(PyObject *module, PyObject *func, PyObject *seq,
955955
PyObject *result)
956-
/*[clinic end generated code: output=30d898fe1267c79d input=40be8069bcbc1a75]*/
956+
/*[clinic end generated code: output=30d898fe1267c79d input=968b8e45b819c0da]*/
957957
{
958958
PyObject *args, *it;
959959

@@ -1795,7 +1795,9 @@ _functools_exec(PyObject *module)
17951795
// lru_list_elem is used only in _lru_cache_wrapper.
17961796
// So we don't expose it in module namespace.
17971797

1798-
if (PyModule_Add(module, "_initial_missing", _PyObject_New(&PyBaseObject_Type)) < 0) {
1798+
if (PyModule_Add(module, "_initial_missing",
1799+
PyObject_New(PyObject, &PyBaseObject_Type)) < 0)
1800+
{
17991801
return -1;
18001802
}
18011803

Modules/clinic/_functoolsmodule.c.h

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)