File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
@@ -663,10 +663,10 @@ _multiprocessing_SemLock__is_zero_impl(SemLockObject *self)
663663 Py_RETURN_FALSE ;
664664 }
665665#else
666- long sval ;
666+ int sval ;
667667 if (SEM_GETVALUE (self -> handle , & sval ) < 0 )
668668 return _PyMp_SetError (NULL , MP_STANDARD_ERROR );
669- return PyBool_FromLong (sval == 0 );
669+ return PyBool_FromLong (( long ) sval == 0 );
670670#endif
671671}
672672
You can’t perform that action at this time.
0 commit comments