File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
quaddtype/numpy_quaddtype/src Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -215,6 +215,9 @@ QuadPrecision_repr(QuadPrecisionObject *self)
215
215
static PyObject *
216
216
QuadPrecision_repr_dragon4 (QuadPrecisionObject * self )
217
217
{
218
+ #ifdef Py_GIL_DISABLED
219
+ PyMutex_Lock (& scalar_mutex );
220
+ #endif
218
221
Dragon4_Options opt = {.scientific = 1 ,
219
222
.digit_mode = DigitMode_Unique ,
220
223
.cutoff_mode = CutoffMode_TotalLength ,
@@ -244,6 +247,9 @@ QuadPrecision_repr_dragon4(QuadPrecisionObject *self)
244
247
const char * backend_str = (self -> backend == BACKEND_SLEEF ) ? "sleef" : "longdouble" ;
245
248
PyObject * res = PyUnicode_FromFormat ("QuadPrecision('%S', backend='%s')" , str , backend_str );
246
249
Py_DECREF (str );
250
+ #ifdef Py_GIL_DISABLED
251
+ PyMutex_Unlock (& scalar_mutex );
252
+ #endif
247
253
return res ;
248
254
}
249
255
You can’t perform that action at this time.
0 commit comments