summaryrefslogtreecommitdiffstats
path: root/Objects/clinic
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-10-27 01:24:34 (GMT)
committerGitHub <noreply@github.com>2020-10-27 01:24:34 (GMT)
commitc9bc290dd6e3994a4ead2a224178bcba86f0c0e4 (patch)
treef3a4e137da850af0438119da460877c3a4fd8532 /Objects/clinic
parent303aac8c56609290e122eecc14c038e9b1e4174a (diff)
downloadcpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.zip
cpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.tar.gz
cpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.tar.bz2
bpo-42161: Use _PyLong_GetZero() and _PyLong_GetOne() (GH-22995)
Use _PyLong_GetZero() and _PyLong_GetOne() in Objects/ and Python/ directories.
Diffstat (limited to 'Objects/clinic')
-rw-r--r--Objects/clinic/complexobject.c.h4
-rw-r--r--Objects/clinic/floatobject.c.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h
index 4c8191f..557fbf9 100644
--- a/Objects/clinic/complexobject.c.h
+++ b/Objects/clinic/complexobject.c.h
@@ -90,7 +90,7 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
PyObject * const *fastargs;
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
- PyObject *r = _PyLong_Zero;
+ PyObject *r = NULL;
PyObject *i = NULL;
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 0, 2, 0, argsbuf);
@@ -113,4 +113,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=193a37aebaaa5f89 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=056cac3226d94967 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h
index b755483..5643f0e 100644
--- a/Objects/clinic/floatobject.c.h
+++ b/Objects/clinic/floatobject.c.h
@@ -206,7 +206,7 @@ static PyObject *
float_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
- PyObject *x = _PyLong_Zero;
+ PyObject *x = NULL;
if ((type == &PyFloat_Type) &&
!_PyArg_NoKeywords("float", kwargs)) {
@@ -387,4 +387,4 @@ float___format__(PyObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=25fbbe253f44e2df input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bb079c3e130e4ce6 input=a9049054013a1b77]*/