Skip to content

Commit 652c35f

Browse files
committed
only lock call
1 parent 72b2023 commit 652c35f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quaddtype/numpy_quaddtype/src/scalar.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,11 @@ PyObject* quad_to_pylong(Sleef_quad value)
439439
char buffer[128];
440440

441441
// Sleef_snprintf call is thread-unsafe
442-
// LOCK_SLEEF;
442+
LOCK_SLEEF;
443443
// Format as integer (%.0Qf gives integer with no decimal places)
444444
// Q modifier means pass Sleef_quad by value
445445
int written = Sleef_snprintf(buffer, sizeof(buffer), "%.0Qf", value);
446-
// UNLOCK_SLEEF;
446+
UNLOCK_SLEEF;
447447
if (written < 0 || written >= sizeof(buffer)) {
448448
PyErr_SetString(PyExc_RuntimeError, "Failed to convert quad to string");
449449
return NULL;

0 commit comments

Comments
 (0)