@@ -193,7 +193,7 @@ semlock_release(SemLockObject *self, PyObject *args)
193193#ifndef HAVE_SEM_TIMEDWAIT
194194# define sem_timedwait (sem ,deadline ) sem_timedwait_save(sem,deadline,_save)
195195
196- int
196+ static int
197197sem_timedwait_save (sem_t * sem , struct timespec * deadline , PyThreadState * _save )
198198{
199199 int res ;
@@ -444,7 +444,7 @@ semlock_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
444444 failure :
445445 if (handle != SEM_FAILED )
446446 SEM_CLOSE (handle );
447- mp_SetError (NULL , MP_STANDARD_ERROR );
447+ _PyMp_SetError (NULL , MP_STANDARD_ERROR );
448448 return NULL ;
449449}
450450
@@ -491,7 +491,7 @@ semlock_getvalue(SemLockObject *self)
491491#else
492492 int sval ;
493493 if (SEM_GETVALUE (self -> handle , & sval ) < 0 )
494- return mp_SetError (NULL , MP_STANDARD_ERROR );
494+ return _PyMp_SetError (NULL , MP_STANDARD_ERROR );
495495 /* some posix implementations use negative numbers to indicate
496496 the number of waiting threads */
497497 if (sval < 0 )
@@ -507,16 +507,16 @@ semlock_iszero(SemLockObject *self)
507507 if (sem_trywait (self -> handle ) < 0 ) {
508508 if (errno == EAGAIN )
509509 Py_RETURN_TRUE ;
510- return mp_SetError (NULL , MP_STANDARD_ERROR );
510+ return _PyMp_SetError (NULL , MP_STANDARD_ERROR );
511511 } else {
512512 if (sem_post (self -> handle ) < 0 )
513- return mp_SetError (NULL , MP_STANDARD_ERROR );
513+ return _PyMp_SetError (NULL , MP_STANDARD_ERROR );
514514 Py_RETURN_FALSE ;
515515 }
516516#else
517517 int sval ;
518518 if (SEM_GETVALUE (self -> handle , & sval ) < 0 )
519- return mp_SetError (NULL , MP_STANDARD_ERROR );
519+ return _PyMp_SetError (NULL , MP_STANDARD_ERROR );
520520 return PyBool_FromLong ((long )sval == 0 );
521521#endif
522522}
@@ -574,7 +574,7 @@ static PyMemberDef semlock_members[] = {
574574 * Semaphore type
575575 */
576576
577- PyTypeObject SemLockType = {
577+ PyTypeObject _PyMp_SemLockType = {
578578 PyVarObject_HEAD_INIT (NULL , 0 )
579579 /* tp_name */ "_multiprocessing.SemLock" ,
580580 /* tp_basicsize */ sizeof (SemLockObject ),
0 commit comments