]> granicus.if.org Git - python/commitdiff
Specify default values of semantic booleans in Argument Clinic generated signatures...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 30 May 2015 08:30:39 +0000 (11:30 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 30 May 2015 08:30:39 +0000 (11:30 +0300)
Modules/cjkcodecs/clinic/multibytecodec.c.h
Modules/cjkcodecs/multibytecodec.c
Modules/clinic/pyexpat.c.h
Modules/pyexpat.c
Objects/bytearrayobject.c
Objects/bytesobject.c
Python/bltinmodule.c
Python/clinic/bltinmodule.c.h

index 1985147c43b58eae5d8ef5581e36261645833203..8a47ff88a68ef85ba3f9966eca36534dc62abeed 100644 (file)
@@ -79,7 +79,7 @@ exit:
 }
 
 PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__,
-"encode($self, /, input, final=0)\n"
+"encode($self, /, input, final=False)\n"
 "--\n"
 "\n");
 
@@ -126,7 +126,7 @@ _multibytecodec_MultibyteIncrementalEncoder_reset(MultibyteIncrementalEncoderObj
 }
 
 PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__,
-"decode($self, /, input, final=0)\n"
+"decode($self, /, input, final=False)\n"
 "--\n"
 "\n");
 
@@ -317,4 +317,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
 
 #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF    \
     {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=c104f5fd548c1ac5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=eebb21e18c3043d1 input=a9049054013a1b77]*/
index c4dff412ef0f159dfb74f948e2c4d39904e3730e..c0515141c9e6629a07e4bd93c817e9479a8d31a4 100644 (file)
@@ -884,14 +884,14 @@ decoder_feed_buffer(MultibyteStatefulDecoderContext *ctx,
 _multibytecodec.MultibyteIncrementalEncoder.encode
 
     input: object
-    final: int = 0
+    final: int(c_default="0") = False
 [clinic start generated code]*/
 
 static PyObject *
 _multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
                                                         PyObject *input,
                                                         int final)
-/*[clinic end generated code: output=123361b6c505e2c1 input=456b76d73e464661]*/
+/*[clinic end generated code: output=123361b6c505e2c1 input=a345c688fa664f92]*/
 {
     return encoder_encode_stateful(STATEFUL_ECTX(self), input, final);
 }
@@ -1041,14 +1041,14 @@ static PyTypeObject MultibyteIncrementalEncoder_Type = {
 _multibytecodec.MultibyteIncrementalDecoder.decode
 
     input: Py_buffer
-    final: int = 0
+    final: int(c_default="0") = False
 [clinic start generated code]*/
 
 static PyObject *
 _multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
                                                         Py_buffer *input,
                                                         int final)
-/*[clinic end generated code: output=b9b9090e8a9ce2ba input=eb18c2f6e83589e1]*/
+/*[clinic end generated code: output=b9b9090e8a9ce2ba input=576631c61906d39d]*/
 {
     MultibyteDecodeBuffer buf;
     char *data, *wdata = NULL;
index 72861bec3d1859c8ff60a15d87bce07ceaae2e82..379c5db637dc330554464eab571fcb78bfc32e43 100644 (file)
@@ -3,7 +3,7 @@ preserve
 [clinic start generated code]*/
 
 PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__,
-"Parse($self, data, isFinal=0, /)\n"
+"Parse($self, data, isfinal=False, /)\n"
 "--\n"
 "\n"
 "Parse XML data.\n"
@@ -15,19 +15,19 @@ PyDoc_STRVAR(pyexpat_xmlparser_Parse__doc__,
 
 static PyObject *
 pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
-                             int isFinal);
+                             int isfinal);
 
 static PyObject *
 pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *args)
 {
     PyObject *return_value = NULL;
     PyObject *data;
-    int isFinal = 0;
+    int isfinal = 0;
 
     if (!PyArg_ParseTuple(args, "O|i:Parse",
-        &data, &isFinal))
+        &data, &isfinal))
         goto exit;
-    return_value = pyexpat_xmlparser_Parse_impl(self, data, isFinal);
+    return_value = pyexpat_xmlparser_Parse_impl(self, data, isfinal);
 
 exit:
     return return_value;
@@ -281,4 +281,4 @@ exit:
 #ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
     #define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
 #endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
-/*[clinic end generated code: output=958c0faa1b855fc7 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bf4d99c9702d8a6c input=a9049054013a1b77]*/
index 7a8e96a2d9a1f60532d66b44fff69b6fb3b6850f..a43887e04c3dd51b10d3906a2fcde075171ed10b 100644 (file)
@@ -707,7 +707,7 @@ get_parse_result(xmlparseobject *self, int rv)
 pyexpat.xmlparser.Parse
 
     data: object
-    isFinal: int = 0
+    isfinal: int(c_default="0") = False
     /
 
 Parse XML data.
@@ -717,8 +717,8 @@ Parse XML data.
 
 static PyObject *
 pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
-                             int isFinal)
-/*[clinic end generated code: output=37e105d55645b0f2 input=e37b81b8948ca7e0]*/
+                             int isfinal)
+/*[clinic end generated code: output=f4db843dd1f4ed4b input=199d9e8e92ebbb4b]*/
 {
     const char *s;
     Py_ssize_t slen;
@@ -748,7 +748,7 @@ pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
         slen -= MAX_CHUNK_SIZE;
     }
     assert(MAX_CHUNK_SIZE < INT_MAX && slen < INT_MAX);
-    rc = XML_Parse(self->itself, s, (int)slen, isFinal);
+    rc = XML_Parse(self->itself, s, (int)slen, isfinal);
 
 done:
     if (view.buf != NULL)
index b9477ca9f5658581ed6abbd2da9a5ae155f0cac2..28b1f68eea2d30b5037e911cacddda6f04d90a31 100644 (file)
@@ -2773,7 +2773,7 @@ bytearray_join(PyByteArrayObject *self, PyObject *iterable_of_bytes)
 /*[clinic input]
 bytearray.splitlines
 
-    keepends: int(py_default="False") = 0
+    keepends: int(c_default="0") = False
 
 Return a list of the lines in the bytearray, breaking at line boundaries.
 
@@ -2783,7 +2783,7 @@ true.
 
 static PyObject *
 bytearray_splitlines_impl(PyByteArrayObject *self, int keepends)
-/*[clinic end generated code: output=4223c94b895f6ad9 input=36f0b25bc792f6c0]*/
+/*[clinic end generated code: output=4223c94b895f6ad9 input=8ccade941e5ea0bd]*/
 {
     return stringlib_splitlines(
         (PyObject*) self, PyByteArray_AS_STRING(self),
index d2b52c77b3329b71852799672a24ad963234a589..c576678c410a2f045c48f3cc8d2de9ab78f5fc99 100644 (file)
@@ -2942,7 +2942,7 @@ bytes_decode_impl(PyBytesObject*self, const char *encoding,
 /*[clinic input]
 bytes.splitlines
 
-    keepends: int(py_default="False") = 0
+    keepends: int(c_default="0") = False
 
 Return a list of the lines in the bytes, breaking at line boundaries.
 
@@ -2952,7 +2952,7 @@ true.
 
 static PyObject *
 bytes_splitlines_impl(PyBytesObject*self, int keepends)
-/*[clinic end generated code: output=995c3598f7833cad input=ddb93e3351080c8c]*/
+/*[clinic end generated code: output=995c3598f7833cad input=7f4aac67144f9944]*/
 {
     return stringlib_splitlines(
         (PyObject*) self, PyBytes_AS_STRING(self),
index b05a70f1dd19ce5c881887276f425a378b11d6b0..2f22209e9d68618dd7a53ee052701f2a472cf936 100644 (file)
@@ -637,7 +637,7 @@ compile as builtin_compile
     filename: object(converter="PyUnicode_FSDecoder")
     mode: str
     flags: int = 0
-    dont_inherit: int = 0
+    dont_inherit: int(c_default="0") = False
     optimize: int = -1
 
 Compile source into a code object that can be executed by exec() or eval().
@@ -648,9 +648,9 @@ The mode must be 'exec' to compile a module, 'single' to compile a
 single (interactive) statement, or 'eval' to compile an expression.
 The flags argument, if present, controls which future statements influence
 the compilation of the code.
-The dont_inherit argument, if non-zero, stops the compilation inheriting
+The dont_inherit argument, if true, stops the compilation inheriting
 the effects of any future statements in effect in the code calling
-compile; if absent or zero these statements do influence the compilation,
+compile; if absent or false these statements do influence the compilation,
 in addition to any features explicitly specified.
 [clinic start generated code]*/
 
@@ -658,7 +658,7 @@ static PyObject *
 builtin_compile_impl(PyModuleDef *module, PyObject *source,
                      PyObject *filename, const char *mode, int flags,
                      int dont_inherit, int optimize)
-/*[clinic end generated code: output=31881762c1bb90c4 input=7faa105f669fefcf]*/
+/*[clinic end generated code: output=31881762c1bb90c4 input=9d53e8cfb3c86414]*/
 {
     Py_buffer view = {NULL, NULL};
     const char *str;
index bbca53432a87316117462bf935103574c4264cb5..7369148b23a9ec8bd2b06b7ff4a61e8d65b45e35 100644 (file)
@@ -129,8 +129,8 @@ exit:
 }
 
 PyDoc_STRVAR(builtin_compile__doc__,
-"compile($module, /, source, filename, mode, flags=0, dont_inherit=0,\n"
-"        optimize=-1)\n"
+"compile($module, /, source, filename, mode, flags=0,\n"
+"        dont_inherit=False, optimize=-1)\n"
 "--\n"
 "\n"
 "Compile source into a code object that can be executed by exec() or eval().\n"
@@ -141,9 +141,9 @@ PyDoc_STRVAR(builtin_compile__doc__,
 "single (interactive) statement, or \'eval\' to compile an expression.\n"
 "The flags argument, if present, controls which future statements influence\n"
 "the compilation of the code.\n"
-"The dont_inherit argument, if non-zero, stops the compilation inheriting\n"
+"The dont_inherit argument, if true, stops the compilation inheriting\n"
 "the effects of any future statements in effect in the code calling\n"
-"compile; if absent or zero these statements do influence the compilation,\n"
+"compile; if absent or false these statements do influence the compilation,\n"
 "in addition to any features explicitly specified.");
 
 #define BUILTIN_COMPILE_METHODDEF    \
@@ -660,4 +660,4 @@ builtin_issubclass(PyModuleDef *module, PyObject *args)
 exit:
     return return_value;
 }
-/*[clinic end generated code: output=9b34d1ca57effad8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=bec3399c0aee98d7 input=a9049054013a1b77]*/