[Python-checkins] cpython: Silence a compiler warning about an unused function
brett.cannon
python-checkins at python.org
Fri Nov 1 15:25:19 CET 2013
http://hg.python.org/cpython/rev/b59ef5f203da
changeset: 86822:b59ef5f203da
user: Brett Cannon <brett at python.org>
date: Fri Nov 01 10:25:13 2013 -0400
summary:
Silence a compiler warning about an unused function
files:
Modules/_hashopenssl.c | 56 +++++++++++++++---------------
1 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -63,34 +63,6 @@
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 @@
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\
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list