diff options
author | Christian Heimes <christian@cheimes.de> | 2013-06-14 13:14:29 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-06-14 13:14:29 (GMT) |
commit | 200bb1b08c9e9137066c030ae8ca17621156d847 (patch) | |
tree | 218471267c8684d8bc6415fc088b67146f93e770 /Modules/_ssl.c | |
parent | 13728a57c8d3ee4a4453fd21d2975b1e9e3bac1b (diff) | |
download | cpython-200bb1b08c9e9137066c030ae8ca17621156d847.zip cpython-200bb1b08c9e9137066c030ae8ca17621156d847.tar.gz cpython-200bb1b08c9e9137066c030ae8ca17621156d847.tar.bz2 |
Simplify return value of ssl.get_default_verify_paths
prefix function with PySSL_, too. Other module level functions have a prefix, too.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index aab288b..7c83498 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2769,13 +2769,12 @@ set_default_verify_paths() to load default CAs. The values are\n\ 'cert_file_env', 'cert_file', 'cert_dir_env', 'cert_dir'."); static PyObject * -get_default_verify_paths(PyObject *self) +PySSL_get_default_verify_paths(PyObject *self) { PyObject *ofile_env = NULL; PyObject *ofile = NULL; PyObject *odir_env = NULL; PyObject *odir = NULL; - PyObject *tup = NULL; #define convert(info, target) { \ const char *tmp = (info); \ @@ -2792,14 +2791,7 @@ get_default_verify_paths(PyObject *self) convert(X509_get_default_cert_dir(), odir); #undef convert - if ((tup = PyTuple_New(4)) == NULL) { - goto error; - } - PyTuple_SET_ITEM(tup, 0, ofile_env); - PyTuple_SET_ITEM(tup, 1, ofile); - PyTuple_SET_ITEM(tup, 2, odir_env); - PyTuple_SET_ITEM(tup, 3, odir); - return tup; + return Py_BuildValue("NNNN", ofile_env, ofile, odir_env, odir); error: Py_XDECREF(ofile_env); @@ -2950,7 +2942,7 @@ static PyMethodDef PySSL_methods[] = { {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS, PySSL_RAND_status_doc}, #endif - {"get_default_verify_paths", (PyCFunction)get_default_verify_paths, + {"get_default_verify_paths", (PyCFunction)PySSL_get_default_verify_paths, METH_NOARGS, PySSL_get_default_verify_paths_doc}, #ifdef _MSC_VER {"enum_cert_store", (PyCFunction)PySSL_enum_cert_store, |