Mercurial > hg > vampy
annotate PyFeature.h @ 35:2ba482378038 vampy2
* Fix compile error with VC++. I am totally at a loss to explain
why this should have compiled with any other compiler!
* Update VC project file.
This code does now build with VC++ without HAVE_NUMPY -- I haven't
installed Numpy yet
author | cannam |
---|---|
date | Thu, 24 Sep 2009 08:52:04 +0000 |
parents | c905122f79e7 |
children |
rev | line source |
---|---|
fazekasgy@31 | 1 #ifndef _PYFEATURE_H_ |
fazekasgy@31 | 2 #define _PYFEATURE_H_ |
fazekasgy@31 | 3 |
fazekasgy@31 | 4 #include "vamp-sdk/Plugin.h" |
fazekasgy@31 | 5 // #include "PyTypeInterface.h" |
fazekasgy@31 | 6 |
fazekasgy@31 | 7 typedef struct { |
fazekasgy@31 | 8 PyObject_HEAD |
fazekasgy@31 | 9 PyObject *dict; /* Attributes dictionary */ |
fazekasgy@31 | 10 // Vamp::Plugin::Feature *feature; |
fazekasgy@31 | 11 /// pointer to type interface required |
fazekasgy@31 | 12 // PyTypeInterface ti; |
fazekasgy@31 | 13 } FeatureObject; |
fazekasgy@31 | 14 |
fazekasgy@31 | 15 PyAPI_DATA(PyTypeObject) Feature_Type; |
fazekasgy@31 | 16 |
fazekasgy@31 | 17 #define PyFeature_CheckExact(v) ((v)->ob_type == &Feature_Type) |
fazekasgy@31 | 18 #define PyFeature_Check(v) PyObject_TypeCheck(v, &Feature_Type) |
fazekasgy@31 | 19 ///fast macro version as per API convention |
fazekasgy@31 | 20 #define PyFeature_AS_DICT(v) ((const FeatureObject* const) (v))->dict |
fazekasgy@31 | 21 |
fazekasgy@31 | 22 |
fazekasgy@31 | 23 /* PyFeature C++ API */ |
fazekasgy@31 | 24 |
fazekasgy@31 | 25 /// Not required: we will never have to pass a feature back from the wrapper |
fazekasgy@31 | 26 // PyAPI_FUNC(PyObject *) |
fazekasgy@31 | 27 // PyFeature_FromFeature(Vamp::RealTime&); |
fazekasgy@31 | 28 |
fazekasgy@31 | 29 // PyAPI_FUNC(const Vamp::Plugin::Feature*) |
fazekasgy@31 | 30 // PyFeature_AsFeature (PyObject *self); |
fazekasgy@31 | 31 |
fazekasgy@31 | 32 ///fast macro version as per API convention |
fazekasgy@31 | 33 // #define PyFeature_AS_FEATURE(v) ((const FeatureObject* const) (v))->feature |
fazekasgy@31 | 34 |
fazekasgy@31 | 35 |
cannam@34 | 36 #endif |