summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_ssl.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-14 10:31:50 (GMT)
committerGitHub <noreply@github.com>2019-09-14 10:31:50 (GMT)
commitd322abbb83eb751045246a70f39d040d13a6108b (patch)
tree40ecc91950b369af1aaaebdd677c071aeae72d53 /Modules/clinic/_ssl.c.h
parent66da347ef0034ad9bddc7fad112025c886249f0d (diff)
downloadcpython-d322abbb83eb751045246a70f39d040d13a6108b.zip
cpython-d322abbb83eb751045246a70f39d040d13a6108b.tar.gz
cpython-d322abbb83eb751045246a70f39d040d13a6108b.tar.bz2
[3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all. (cherry picked from commit 279f44678c8b84a183f9eeb85e0b086228154497) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Modules/clinic/_ssl.c.h')
-rw-r--r--Modules/clinic/_ssl.c.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/clinic/_ssl.c.h b/Modules/clinic/_ssl.c.h
index 25769a2..ce8669a 100644
--- a/Modules/clinic/_ssl.c.h
+++ b/Modules/clinic/_ssl.c.h
@@ -571,8 +571,8 @@ _ssl__SSLContext_load_cert_chain(PySSLContext *self, PyObject *const *args, Py_s
PyObject *argsbuf[3];
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
PyObject *certfile;
- PyObject *keyfile = NULL;
- PyObject *password = NULL;
+ PyObject *keyfile = Py_None;
+ PyObject *password = Py_None;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 1, 3, 0, argsbuf);
if (!args) {
@@ -618,9 +618,9 @@ _ssl__SSLContext_load_verify_locations(PySSLContext *self, PyObject *const *args
static _PyArg_Parser _parser = {NULL, _keywords, "load_verify_locations", 0};
PyObject *argsbuf[3];
Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
- PyObject *cafile = NULL;
- PyObject *capath = NULL;
- PyObject *cadata = NULL;
+ PyObject *cafile = Py_None;
+ PyObject *capath = Py_None;
+ PyObject *cadata = Py_None;
args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser, 0, 3, 0, argsbuf);
if (!args) {
@@ -1482,4 +1482,4 @@ exit:
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
-/*[clinic end generated code: output=aa4947067c3fef2d input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a4aeb3f92a091c64 input=a9049054013a1b77]*/