Index: python/ext/aubiowraphell.h
===================================================================
--- python/ext/aubiowraphell.h	(revision 5c1200a07d442662cc3279233173686679737953)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#include "aubio-types.h"
-
-#define AUBIO_DECLARE(NAME, PARAMS...) \
-typedef struct { \
-  PyObject_HEAD \
-  aubio_ ## NAME ## _t * o; \
-  PARAMS; \
-} Py_## NAME;
-
-#define AUBIO_INIT(NAME, PARAMS... ) \
-static int \
-Py_ ## NAME ## _init (Py_ ## NAME * self, PyObject * args, PyObject * kwds) \
-{ \
-  self->o = new_aubio_## NAME ( PARAMS ); \
-  if (self->o == NULL) { \
-    PyErr_SetString (PyExc_RuntimeError, "error creating object"); \
-    return -1; \
-  } \
-\
-  return 0; \
-}
-
-#define AUBIO_DEL(NAME) \
-static void \
-Py_ ## NAME ## _del ( Py_ ## NAME * self) \
-{ \
-  del_aubio_ ## NAME (self->o); \
-  Py_TYPE(self)->tp_free ((PyObject *) self); \
-}
-
-#define AUBIO_MEMBERS_START(NAME) \
-static PyMemberDef Py_ ## NAME ## _members[] = {
-
-#define AUBIO_MEMBERS_STOP(NAME) \
-  {NULL} \
-};
-
-#define AUBIO_METHODS(NAME) \
-static PyMethodDef Py_ ## NAME ## _methods[] = { \
-  {NULL} \
-};
-
-
-#define AUBIO_TYPEOBJECT(NAME, PYNAME) \
-PyTypeObject Py_ ## NAME ## Type = { \
-  PyVarObject_HEAD_INIT (NULL, 0) \
-  PYNAME,                      \
-  sizeof (Py_ ## NAME),          \
-  0,                           \
-  (destructor) Py_ ## NAME ## _del,  \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  (ternaryfunc)Py_ ## NAME ## _do,   \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  Py_TPFLAGS_DEFAULT,          \
-  Py_ ## NAME ## _doc,               \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  Py_ ## NAME ## _methods,           \
-  Py_ ## NAME ## _members,           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  0,                           \
-  (initproc) Py_ ## NAME ## _init,   \
-  0,                           \
-  Py_ ## NAME ## _new,               \
-};
-
-// some more helpers
-#define AUBIO_NEW_VEC(name, type, lengthval) \
-  name = (type *) PyObject_New (type, & type ## Type); \
-  name->length = lengthval;
Index: python/ext/py-fft.c
===================================================================
--- python/ext/py-fft.c	(revision 5c1200a07d442662cc3279233173686679737953)
+++ python/ext/py-fft.c	(revision 5652a8c325fbe66ecb765e7e38b4be4a2a9b18ae)
@@ -1,3 +1,3 @@
-#include "aubiowraphell.h"
+#include "aubio-types.h"
 
 static char Py_fft_doc[] = "fft object";
@@ -12,5 +12,4 @@
 } Py_fft;
 
-//AUBIO_NEW(fft)
 static PyObject *
 Py_fft_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
@@ -90,8 +89,9 @@
 }
 
-AUBIO_MEMBERS_START(fft) 
+static PyMemberDef Py_fft_members[] = {
   {"win_s", T_INT, offsetof (Py_fft, win_s), READONLY,
     "size of the window"},
-AUBIO_MEMBERS_STOP(fft)
+  {NULL}
+};
 
 static PyObject * 
@@ -122,3 +122,42 @@
 };
 
-AUBIO_TYPEOBJECT(fft, "aubio.fft")
+PyTypeObject Py_fftType = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+  "aubio.fft",
+  sizeof (Py_fft),
+  0,
+  (destructor) Py_fft_del,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (ternaryfunc)Py_fft_do,
+  0,
+  0,
+  0,
+  0,
+  Py_TPFLAGS_DEFAULT,
+  Py_fft_doc,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  Py_fft_methods,
+  Py_fft_members,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (initproc) Py_fft_init,
+  0,
+  Py_fft_new,
+};
Index: python/ext/py-filterbank.c
===================================================================
--- python/ext/py-filterbank.c	(revision 5c1200a07d442662cc3279233173686679737953)
+++ python/ext/py-filterbank.c	(revision 5652a8c325fbe66ecb765e7e38b4be4a2a9b18ae)
@@ -1,3 +1,3 @@
-#include "aubiowraphell.h"
+#include "aubio-types.h"
 
 static char Py_filterbank_doc[] = "filterbank object";
@@ -12,5 +12,4 @@
 } Py_filterbank;
 
-//AUBIO_NEW(filterbank)
 static PyObject *
 Py_filterbank_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
@@ -97,10 +96,11 @@
 }
 
-AUBIO_MEMBERS_START(filterbank)
+static PyMemberDef Py_filterbank_members[] = {
   {"win_s", T_INT, offsetof (Py_filterbank, win_s), READONLY,
     "size of the window"},
   {"n_filters", T_INT, offsetof (Py_filterbank, n_filters), READONLY,
     "number of filters"},
-AUBIO_MEMBERS_STOP(filterbank)
+  {NULL} /* sentinel */
+};
 
 static PyObject *
@@ -204,3 +204,42 @@
 };
 
-AUBIO_TYPEOBJECT(filterbank, "aubio.filterbank")
+PyTypeObject Py_filterbankType = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+  "aubio.filterbank",
+  sizeof (Py_filterbank),
+  0,
+  (destructor) Py_filterbank_del,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (ternaryfunc)Py_filterbank_do,
+  0,
+  0,
+  0,
+  0,
+  Py_TPFLAGS_DEFAULT,
+  Py_filterbank_doc,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  Py_filterbank_methods,
+  Py_filterbank_members,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (initproc) Py_filterbank_init,
+  0,
+  Py_filterbank_new,
+};
Index: python/ext/py-phasevoc.c
===================================================================
--- python/ext/py-phasevoc.c	(revision 5c1200a07d442662cc3279233173686679737953)
+++ python/ext/py-phasevoc.c	(revision 5652a8c325fbe66ecb765e7e38b4be4a2a9b18ae)
@@ -1,3 +1,3 @@
-#include "aubiowraphell.h"
+#include "aubio-types.h"
 
 static char Py_pvoc_doc[] = "pvoc object";
@@ -14,5 +14,4 @@
 
 
-//AUBIO_NEW(pvoc)
 static PyObject *
 Py_pvoc_new (PyTypeObject * type, PyObject * args, PyObject * kwds)
@@ -56,12 +55,24 @@
   }
 
+  return (PyObject *) self;
+}
+
+static int
+Py_pvoc_init (Py_pvoc * self, PyObject * args, PyObject * kwds)
+{
+  self->o = new_aubio_pvoc ( self->win_s, self->hop_s);
+  if (self->o == NULL) {
+    char_t errstr[30];
+    sprintf(errstr, "error creating pvoc with %d, %d", self->win_s, self->hop_s);
+    PyErr_SetString (PyExc_RuntimeError, errstr);
+    return -1;
+  }
+
   self->output = new_cvec(self->win_s);
   self->routput = new_fvec(self->hop_s);
 
-  return (PyObject *) self;
+  return 0;
 }
 
-
-AUBIO_INIT(pvoc, self->win_s, self->hop_s)
 
 static void
@@ -96,10 +107,11 @@
 }
 
-AUBIO_MEMBERS_START(pvoc) 
+static PyMemberDef Py_pvoc_members[] = {
   {"win_s", T_INT, offsetof (Py_pvoc, win_s), READONLY,
     "size of the window"},
   {"hop_s", T_INT, offsetof (Py_pvoc, hop_s), READONLY,
     "size of the hop"},
-AUBIO_MEMBERS_STOP(pvoc)
+  { NULL } // sentinel
+};
 
 static PyObject * 
@@ -129,3 +141,42 @@
 };
 
-AUBIO_TYPEOBJECT(pvoc, "aubio.pvoc")
+PyTypeObject Py_pvocType = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+  "aubio.pvoc",
+  sizeof (Py_pvoc),
+  0,
+  (destructor) Py_pvoc_del,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (ternaryfunc)Py_pvoc_do,
+  0,
+  0,
+  0,
+  0,
+  Py_TPFLAGS_DEFAULT,
+  Py_pvoc_doc,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  Py_pvoc_methods,
+  Py_pvoc_members,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (initproc) Py_pvoc_init,
+  0,
+  Py_pvoc_new,
+};
Index: python/ext/py-sink.c
===================================================================
--- python/ext/py-sink.c	(revision 5c1200a07d442662cc3279233173686679737953)
+++ python/ext/py-sink.c	(revision 5652a8c325fbe66ecb765e7e38b4be4a2a9b18ae)
@@ -1,3 +1,3 @@
-#include "aubiowraphell.h"
+#include "aubio-types.h"
 
 typedef struct
@@ -125,5 +125,10 @@
 }
 
-AUBIO_DEL(sink)
+static void
+Py_sink_del (Py_sink *self, PyObject *unused)
+{
+  del_aubio_sink(self->o);
+  Py_TYPE(self)->tp_free((PyObject *) self);
+}
 
 /* function Py_sink_do */
@@ -194,5 +199,5 @@
 }
 
-AUBIO_MEMBERS_START(sink)
+static PyMemberDef Py_sink_members[] = {
   {"uri", T_STRING, offsetof (Py_sink, uri), READONLY,
     "path at which the sink was created"},
@@ -201,5 +206,6 @@
   {"channels", T_INT, offsetof (Py_sink, channels), READONLY,
     "number of channels with which the sink was created"},
-AUBIO_MEMBERS_STOP(sink)
+  { NULL } // sentinel
+};
 
 static PyObject *
@@ -217,3 +223,42 @@
 };
 
-AUBIO_TYPEOBJECT(sink, "aubio.sink")
+PyTypeObject Py_sinkType = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+  "aubio.sink",
+  sizeof (Py_sink),
+  0,
+  (destructor) Py_sink_del,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (ternaryfunc)Py_sink_do,
+  0,
+  0,
+  0,
+  0,
+  Py_TPFLAGS_DEFAULT,
+  Py_sink_doc,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  Py_sink_methods,
+  Py_sink_members,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (initproc) Py_sink_init,
+  0,
+  Py_sink_new,
+};
Index: python/ext/py-source.c
===================================================================
--- python/ext/py-source.c	(revision 5c1200a07d442662cc3279233173686679737953)
+++ python/ext/py-source.c	(revision 5652a8c325fbe66ecb765e7e38b4be4a2a9b18ae)
@@ -1,3 +1,3 @@
-#include "aubiowraphell.h"
+#include "aubio-types.h"
 
 typedef struct
@@ -218,5 +218,5 @@
 }
 
-AUBIO_MEMBERS_START(source)
+static PyMemberDef Py_source_members[] = {
   {"uri", T_STRING, offsetof (Py_source, uri), READONLY,
     "path at which the source was created"},
@@ -227,6 +227,6 @@
   {"hop_size", T_INT, offsetof (Py_source, hop_size), READONLY,
     "number of consecutive frames that will be read at each do or do_multi call"},
-AUBIO_MEMBERS_STOP(source)
-
+  { NULL } // sentinel
+};
 
 static PyObject *
@@ -286,3 +286,42 @@
 };
 
-AUBIO_TYPEOBJECT(source, "aubio.source")
+PyTypeObject Py_sourceType = {
+  PyVarObject_HEAD_INIT (NULL, 0)
+  "aubio.source",
+  sizeof (Py_source),
+  0,
+  (destructor) Py_source_del,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (ternaryfunc)Py_source_do,
+  0,
+  0,
+  0,
+  0,
+  Py_TPFLAGS_DEFAULT,
+  Py_source_doc,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  Py_source_methods,
+  Py_source_members,
+  0,
+  0,
+  0,
+  0,
+  0,
+  0,
+  (initproc) Py_source_init,
+  0,
+  Py_source_new,
+};
