Mercurial > hg > vampy
annotate PyFeatureSet.h @ 92:a6718f9fe942
If a module appears to redefine one of our own types, refuse to load it. Also clear out the class dict for all refused modules now, so that we don't get stale names on the next scan due to not having cleared the module on unload
author | Chris Cannam |
---|---|
date | Mon, 14 Jan 2019 16:19:44 +0000 |
parents | f5c028376bf9 |
children |
rev | line source |
---|---|
fazekasgy@37 | 1 /* |
fazekasgy@37 | 2 |
fazekasgy@37 | 3 * Vampy : This plugin is a wrapper around the Vamp plugin API. |
fazekasgy@37 | 4 * It allows for writing Vamp plugins in Python. |
fazekasgy@37 | 5 |
fazekasgy@37 | 6 * Centre for Digital Music, Queen Mary University of London. |
fazekasgy@37 | 7 * Copyright (C) 2008-2009 Gyorgy Fazekas, QMUL. (See Vamp sources |
fazekasgy@37 | 8 * for licence information.) |
fazekasgy@37 | 9 |
fazekasgy@37 | 10 */ |
fazekasgy@37 | 11 |
fazekasgy@37 | 12 #ifndef _PYFEATURESET_H_ |
fazekasgy@37 | 13 #define _PYFEATURESET_H_ |
fazekasgy@37 | 14 |
fazekasgy@37 | 15 #include <Python.h> |
fazekasgy@37 | 16 |
fazekasgy@37 | 17 typedef struct { |
fazekasgy@37 | 18 PyDictObject dict; |
fazekasgy@37 | 19 } FeatureSetObject; |
fazekasgy@37 | 20 |
Chris@79 | 21 extern PyTypeObject FeatureSet_Type; |
fazekasgy@37 | 22 |
fazekasgy@37 | 23 #define PyFeatureSet_CheckExact(v) ((v)->ob_type == &FeatureSet_Type) |
fazekasgy@37 | 24 #define PyFeatureSet_Check(v) PyObject_TypeCheck(v, &FeatureSet_Type) |
fazekasgy@37 | 25 |
Chris@79 | 26 extern void initFeatureSetType(void); |
fazekasgy@37 | 27 |
fazekasgy@37 | 28 #endif |