summaryrefslogtreecommitdiff
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-01-23 12:30:59 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2017-01-23 12:30:59 +0200
commita5c896babbece4868dffd1e8e64ab88afe55b46f (patch)
tree35438398ad09a477613bc77a594c9860a32ec8ab /Modules/_ssl.c
parentc0f01d9eb22ed81c49d8c9fbfd49b6d4c4020310 (diff)
parent1bd620bca594ba9193c63e79e7836765d23047cc (diff)
downloadcpython-a5c896babbece4868dffd1e8e64ab88afe55b46f.tar.gz
Issue #26729: Fixed __text_signature__ for sorted().
Patch by Erik Welch.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index b198857060..1e9a707648 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -755,8 +755,7 @@ _ssl__SSLSocket_do_handshake_impl(PySSLSocket *self)
PySSL_END_ALLOW_THREADS
self->handshake_done = 1;
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
error:
Py_XDECREF(sock);
@@ -3197,7 +3196,7 @@ _password_callback(char *buf, int size, int rwflag, void *userdata)
PySSL_END_ALLOW_THREADS_S(pw_info->thread_state);
if (pw_info->callable) {
- fn_ret = PyObject_CallFunctionObjArgs(pw_info->callable, NULL);
+ fn_ret = _PyObject_CallNoArg(pw_info->callable);
if (!fn_ret) {
/* TODO: It would be nice to move _ctypes_add_traceback() into the
core python API, so we could use it to add a frame here */
@@ -4500,8 +4499,7 @@ _ssl_RAND_add_impl(PyObject *module, Py_buffer *view, double entropy)
buf += written;
len -= written;
} while (len);
- Py_INCREF(Py_None);
- return Py_None;
+ Py_RETURN_NONE;
}
static PyObject *