Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mcepl:branches:devel:languages:python:Factory
python36
openssl-300-prepare-hashlib-remove-threadsless....
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openssl-300-prepare-hashlib-remove-threadsless.patch of Package python36
From 03d1979869a3c102b40531a48916a18e46a23c24 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou <pitrou@free.fr> Date: Thu, 7 Sep 2017 18:56:24 +0200 Subject: [PATCH] OpenSSL 3.0.0: Remove support for threads-less builds * Remove Setup.config * Always define WITH_THREAD for compatibility. Fixes: bpo-31370 From-PR: gh#python/cpython!3385 Released-in: 3.7.0 Patch: openssl-300-prepare-hashlib-remove-threadsless.patch --- Modules/hashlib.h | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Modules/hashlib.h b/Modules/hashlib.h index 530b6b1723c..978593e2f1a 100644 --- a/Modules/hashlib.h +++ b/Modules/hashlib.h @@ -39,24 +39,19 @@ * an operation. */ -#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 +#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); \ + } /* 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. */ -- 2.46.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor