python/ext/py-{source,sink}.c: use _close in .close()
authorPaul Brossier <piem@piem.org>
Sun, 26 Jan 2014 19:20:37 +0000 (16:20 -0300)
committerPaul Brossier <piem@piem.org>
Sun, 26 Jan 2014 19:20:37 +0000 (16:20 -0300)
python/ext/py-sink.c
python/ext/py-source.c

index 5636f4a..c5342ef 100644 (file)
@@ -92,8 +92,7 @@ AUBIO_MEMBERS_STOP(sink)
 static PyObject *
 Pyaubio_sink_close (Py_sink *self, PyObject *unused)
 {
-  del_aubio_sink (self->o);
-  self->o = NULL;
+  aubio_sink_close (self->o);
   Py_RETURN_NONE;
 }
 
index c45ada8..b94a982 100644 (file)
@@ -126,8 +126,7 @@ Pyaubio_source_get_channels (Py_source *self, PyObject *unused)
 static PyObject *
 Pyaubio_source_close (Py_source *self, PyObject *unused)
 {
-  del_aubio_source (self->o);
-  self->o = NULL;
+  aubio_source_close (self->o);
   Py_RETURN_NONE;
 }