@@ -142,9 +142,12 @@ static PyObject* is_fifo(PyObject *self, PyObject *args) {
142142 const char * path = NULL ;
143143
144144#if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1
145+ _cleanup_Py_DECREF_ PyObject * _path = NULL ;
145146 if (!PyArg_ParseTuple (args , "i|O&:_is_fifo" ,
146- & fd , Unicode_FSConverter , & path ))
147+ & fd , Unicode_FSConverter , & _path ))
147148 return NULL ;
149+ if (_path )
150+ path = PyBytes_AsString (_path );
148151#else
149152 if (!PyArg_ParseTuple (args , "i|z:_is_fifo" , & fd , & path ))
150153 return NULL ;
@@ -170,9 +173,12 @@ static PyObject* is_mq(PyObject *self, PyObject *args) {
170173 const char * path = NULL ;
171174
172175#if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1
176+ _cleanup_Py_DECREF_ PyObject * _path = NULL ;
173177 if (!PyArg_ParseTuple (args , "i|O&:_is_mq" ,
174- & fd , Unicode_FSConverter , & path ))
178+ & fd , Unicode_FSConverter , & _path ))
175179 return NULL ;
180+ if (_path )
181+ path = PyBytes_AsString (_path );
176182#else
177183 if (!PyArg_ParseTuple (args , "i|z:_is_mq" , & fd , & path ))
178184 return NULL ;
0 commit comments