Mercurial > hg > vampy-host
comparison native/PyPluginObject.cpp @ 124:bea7cf4126b5
Add RealTime tests, simplify allocations & a couple of fixes
author | Chris Cannam |
---|---|
date | Wed, 24 Jun 2015 14:11:19 +0100 |
parents | 2370b942cd32 |
children | 1f23d18883a1 |
comparison
equal
deleted
inserted
replaced
123:89cc3595c404 | 124:bea7cf4126b5 |
---|---|
80 } | 80 } |
81 | 81 |
82 PyObject * | 82 PyObject * |
83 PyPluginObject_From_Plugin(Plugin *plugin) | 83 PyPluginObject_From_Plugin(Plugin *plugin) |
84 { | 84 { |
85 PyPluginObject *pd = | 85 PyPluginObject *pd = PyObject_New(PyPluginObject, &Plugin_Type); |
86 (PyPluginObject *)PyType_GenericAlloc(&Plugin_Type, 0); | 86 if (!pd) return 0; |
87 | |
87 pd->plugin = plugin; | 88 pd->plugin = plugin; |
88 pd->isInitialised = false; | 89 pd->isInitialised = false; |
89 pd->channels = 0; | 90 pd->channels = 0; |
90 pd->blockSize = 0; | 91 pd->blockSize = 0; |
91 pd->stepSize = 0; | 92 pd->stepSize = 0; |
819 0, /*tp_dict*/ | 820 0, /*tp_dict*/ |
820 0, /*tp_descr_get*/ | 821 0, /*tp_descr_get*/ |
821 0, /*tp_descr_set*/ | 822 0, /*tp_descr_set*/ |
822 0, /*tp_dictoffset*/ | 823 0, /*tp_dictoffset*/ |
823 0, /*tp_init*/ | 824 0, /*tp_init*/ |
824 PyType_GenericAlloc, /*tp_alloc*/ | 825 0, /*tp_alloc*/ |
825 0, /*tp_new*/ | 826 0, /*tp_new*/ |
826 PyObject_Del, /*tp_free*/ | 827 0, /*tp_free*/ |
827 0, /*tp_is_gc*/ | 828 0, /*tp_is_gc*/ |
828 }; | 829 }; |
829 | 830 |