]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update Argument Clinic generated code for bpo-29878. (#1001)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 5 Apr 2017 09:00:42 +0000 (12:00 +0300)
committerGitHub <noreply@github.com>
Wed, 5 Apr 2017 09:00:42 +0000 (12:00 +0300)
Objects/clinic/complexobject.c.h
Objects/clinic/floatobject.c.h
Objects/complexobject.c
Objects/floatobject.c

index b0b4c0e9c0770ba81f7f1adf59b593b537f36d88..0cbfb793e1024d4d0f07513fe9b8d3aa0792514c 100644 (file)
@@ -19,7 +19,7 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     PyObject *return_value = NULL;
     static const char * const _keywords[] = {"real", "imag", NULL};
     static _PyArg_Parser _parser = {"|OO:complex", _keywords, 0};
-    PyObject *r = Py_False;
+    PyObject *r = _PyLong_Zero;
     PyObject *i = NULL;
 
     if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
@@ -31,4 +31,4 @@ complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=74035493480ab5e5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5017b2458bdc4ecd input=a9049054013a1b77]*/
index d2680b5e1f6887ce26f15a38b0031dcd3867a504..d9ac39dd357d8c71f5cdfa7619e6d9042f727eea 100644 (file)
@@ -171,7 +171,7 @@ static PyObject *
 float_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
 {
     PyObject *return_value = NULL;
-    PyObject *x = Py_False;
+    PyObject *x = _PyLong_Zero;
 
     if ((type == &PyFloat_Type) &&
         !_PyArg_NoKeywords("float", kwargs)) {
@@ -313,4 +313,4 @@ float___format__(PyObject *self, PyObject *arg)
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=a3dafb0f6c6f1514 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=dc6b0b67a7e40c93 input=a9049054013a1b77]*/
index 9a416a873a38635653ce9c9c92a50e2c6efc14ab..3bf37ee437f557604b695bc4b149b614df253506 100644 (file)
@@ -946,7 +946,7 @@ This is equivalent to (real + imag*1j) where imag defaults to 0.
 
 static PyObject *
 complex_new_impl(PyTypeObject *type, PyObject *r, PyObject *i)
-/*[clinic end generated code: output=b6c7dd577b537dc1 input=e3d6b77ddcf280da]*/
+/*[clinic end generated code: output=b6c7dd577b537dc1 input=6f6b0bedba29bcb5]*/
 {
     PyObject *tmp;
     PyNumberMethods *nbr, *nbi = NULL;
index 87af0ba65032ecc9f3576c1c674d56fefdb9c002..8c4fe74d1b83ab9d164028bbab2c09eee7a38a9b 100644 (file)
@@ -1619,7 +1619,7 @@ Convert a string or number to a floating point number, if possible.
 
 static PyObject *
 float_new_impl(PyTypeObject *type, PyObject *x)
-/*[clinic end generated code: output=ccf1e8dc460ba6ba input=c98d8e811ad2037a]*/
+/*[clinic end generated code: output=ccf1e8dc460ba6ba input=540ee77c204ff87a]*/
 {
     if (type != &PyFloat_Type)
         return float_subtype_new(type, x); /* Wimp out */