summaryrefslogtreecommitdiffstats
path: root/Modules/_hashopenssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2012-10-06 00:23:36 (GMT)
committerChristian Heimes <christian@cheimes.de>2012-10-06 00:23:36 (GMT)
commit4a0270d82bfd782c89a8ae2b869102dafb81ffea (patch)
tree5bd4262a7a42e94493aa4a0fdf7cdd32185f3a44 /Modules/_hashopenssl.c
parent8c6db45d3e8a20cabe50f93b2bbc33b0040af5a3 (diff)
downloadcpython-4a0270d82bfd782c89a8ae2b869102dafb81ffea.zip
cpython-4a0270d82bfd782c89a8ae2b869102dafb81ffea.tar.gz
cpython-4a0270d82bfd782c89a8ae2b869102dafb81ffea.tar.bz2
Issue #16113: integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r--Modules/_hashopenssl.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index d37689e..5f38cc9 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -17,24 +17,6 @@
#include "structmember.h"
#include "hashlib.h"
-#ifdef WITH_THREAD
-#include "pythread.h"
- #define ENTER_HASHLIB(obj) \
- if ((obj)->lock) { \
- if (!PyThread_acquire_lock((obj)->lock, 0)) { \
- Py_BEGIN_ALLOW_THREADS \
- PyThread_acquire_lock((obj)->lock, 1); \
- Py_END_ALLOW_THREADS \
- } \
- }
- #define LEAVE_HASHLIB(obj) \
- if ((obj)->lock) { \
- PyThread_release_lock((obj)->lock); \
- }
-#else
- #define ENTER_HASHLIB(obj)
- #define LEAVE_HASHLIB(obj)
-#endif
/* EVP is the preferred interface to hashing in OpenSSL */
#include <openssl/evp.h>
@@ -43,10 +25,6 @@
#define MUNCH_SIZE INT_MAX
-/* TODO(gps): We should probably make this a module or EVPobject attribute
- * to allow the user to optimize based on the platform they're using. */
-#define HASHLIB_GIL_MINSIZE 2048
-
#ifndef HASH_OBJ_CONSTRUCTOR
#define HASH_OBJ_CONSTRUCTOR 0
#endif