diff options
author | Brett Cannon <brett@python.org> | 2013-11-01 14:25:13 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2013-11-01 14:25:13 (GMT) |
commit | 2be28a698490b507ac1b903d0a09d21703580f55 (patch) | |
tree | 406e829d7b2d66f94a4b099d8eadb40c00bf3379 /Modules/_hashopenssl.c | |
parent | 79f5e1f59a8da51caad53a680051151b8db8a06a (diff) | |
download | cpython-2be28a698490b507ac1b903d0a09d21703580f55.zip cpython-2be28a698490b507ac1b903d0a09d21703580f55.tar.gz cpython-2be28a698490b507ac1b903d0a09d21703580f55.tar.bz2 |
Silence a compiler warning about an unused function
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index a4f6104..80e1b61 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -63,34 +63,6 @@ DEFINE_CONSTS_FOR_NEW(sha384) DEFINE_CONSTS_FOR_NEW(sha512) #endif -static PyObject * -_setException(PyObject *exc) -{ - unsigned long errcode; - const char *lib, *func, *reason; - - errcode = ERR_peek_last_error(); - if (!errcode) { - PyErr_SetString(exc, "unknown reasons"); - return NULL; - } - ERR_clear_error(); - - lib = ERR_lib_error_string(errcode); - func = ERR_func_error_string(errcode); - reason = ERR_reason_error_string(errcode); - - if (lib && func) { - PyErr_Format(exc, "[%s: %s] %s", lib, func, reason); - } - else if (lib) { - PyErr_Format(exc, "[%s] %s", lib, reason); - } - else { - PyErr_SetString(exc, reason); - } - return NULL; -} static EVPobject * newEVPobject(PyObject *name) @@ -588,6 +560,34 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen, return 1; } +static PyObject * +_setException(PyObject *exc) +{ + unsigned long errcode; + const char *lib, *func, *reason; + + errcode = ERR_peek_last_error(); + if (!errcode) { + PyErr_SetString(exc, "unknown reasons"); + return NULL; + } + ERR_clear_error(); + + lib = ERR_lib_error_string(errcode); + func = ERR_func_error_string(errcode); + reason = ERR_reason_error_string(errcode); + + if (lib && func) { + PyErr_Format(exc, "[%s: %s] %s", lib, func, reason); + } + else if (lib) { + PyErr_Format(exc, "[%s] %s", lib, reason); + } + else { + PyErr_SetString(exc, reason); + } + return NULL; +} PyDoc_STRVAR(pbkdf2_hmac__doc__, "pbkdf2_hmac(hash_name, password, salt, iterations, dklen=None) -> key\n\ |