--- src/pyvorbisinfo.c +++ src/pyvorbisinfo.c @@ -132,7 +132,7 @@ static void py_ov_info_dealloc(PyObject *self) { - PyMem_DEL(self); + PyObject_Del(self); } #define CMP_RET(x) \ @@ -381,7 +381,7 @@ free(ovc_self->vc); } - PyMem_DEL(self); + PyObject_Del(self); } static PyObject* @@ -905,6 +905,7 @@ #if PY_UNICODE item = PyUnicode_DecodeUTF8(val, vallen, NULL); if (!item) { + PyErr_Clear(); /* To deal with non-UTF8 comments (against the standard) */ item = PyString_FromStringAndSize(val, vallen); } --- src/pyvorbiscodec.c +++ src/pyvorbiscodec.c @@ -118,7 +118,7 @@ { vorbis_dsp_clear(PY_DSP(self)); Py_XDECREF(((py_dsp *)self)->parent); - PyMem_DEL(self); + PyObject_Del(self); } static PyObject* --- src/pyvorbisfile.c +++ src/pyvorbisfile.c @@ -167,7 +167,7 @@ ret = py_ov_open(newobj, args); if (ret == NULL) { - PyMem_DEL(newobj); + PyObject_Del(newobj); return NULL; } else Py_DECREF(ret); @@ -184,7 +184,7 @@ /* If file was opened from a file object, decref it, so it can close */ Py_XDECREF(((py_vorbisfile *) self)->py_file); - PyMem_DEL(self); + PyObject_Del(self); } static PyObject *