Skip to content

Commit 24e3caa

Browse files
committed
Revert fix warning for semaphore
1 parent 5f29ad3 commit 24e3caa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_multiprocessing/semaphore.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,14 +631,14 @@ _multiprocessing_SemLock__get_value_impl(SemLockObject *self)
631631
PyErr_SetNone(PyExc_NotImplementedError);
632632
return NULL;
633633
#else
634-
long sval;
634+
int sval;
635635
if (SEM_GETVALUE(self->handle, &sval) < 0)
636636
return _PyMp_SetError(NULL, MP_STANDARD_ERROR);
637637
/* some posix implementations use negative numbers to indicate
638638
the number of waiting threads */
639639
if (sval < 0)
640640
sval = 0;
641-
return PyLong_FromLong(sval);
641+
return PyLong_FromLong((long)sval);
642642
#endif
643643
}
644644

0 commit comments

Comments
 (0)