diff options
author | Lorenz Quack <don@amberfisharts.com> | 2009-10-08 20:11:55 -0400 |
---|---|---|
committer | Dwayne C. Litzenberger <dlitz@dlitz.net> | 2009-10-08 20:30:48 -0400 |
commit | d4f1039754e6f25b703c6a824db21bc66ef57a07 (patch) | |
tree | 9d0485258d888a117b36ccdd32a305545c89ad14 /src/_fastmath.c | |
parent | 4faac7f8b1023e67cb5b2e6783ee89f7a97e62bb (diff) | |
download | pycrypto-d4f1039754e6f25b703c6a824db21bc66ef57a07.tar.gz |
Apply patch to release the GIL inside isPrime()
This fixes https://bugs.launchpad.net/pycrypto/+bug/439958
Diffstat (limited to 'src/_fastmath.c')
-rwxr-xr-x | src/_fastmath.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/_fastmath.c b/src/_fastmath.c index 74708ab..0c036e3 100755 --- a/src/_fastmath.c +++ b/src/_fastmath.c @@ -785,7 +785,9 @@ isPrime (PyObject * self, PyObject * args) mpz_init (n); longObjToMPZ (n, (PyLongObject *) l); + Py_BEGIN_ALLOW_THREADS; result = mpz_probab_prime_p(n, 5); + Py_END_ALLOW_THREADS; mpz_clear (n); |