Mercurial > hg > vampy
comparison PyExtensionManager.cpp @ 91:c4510e5f7a17
Move more List types from the exposed names list to the commented-out "builtin objects" section. These aren't our own custom types
author | Chris Cannam |
---|---|
date | Mon, 14 Jan 2019 16:16:43 +0000 |
parents | f92587bedb2c |
children | c7694d24500c |
comparison
equal
deleted
inserted
replaced
89:f92587bedb2c | 91:c4510e5f7a17 |
---|---|
23 using std::vector; | 23 using std::vector; |
24 using std::find; | 24 using std::find; |
25 | 25 |
26 //static | 26 //static |
27 const char* PyExtensionManager::m_exposedNames[] = { | 27 const char* PyExtensionManager::m_exposedNames[] = { |
28 | |
28 "ParameterDescriptor", | 29 "ParameterDescriptor", |
29 "OutputDescriptor", | 30 "OutputDescriptor", |
30 "ParameterList", | |
31 "OutputList", | |
32 "FeatureList", | |
33 "FeatureSet", | 31 "FeatureSet", |
34 "Feature", | 32 "Feature", |
35 "RealTime", | 33 "RealTime", |
36 "frame2RealTime", | 34 "frame2RealTime", |
37 /* //using builtin objects: | 35 |
36 /* // using builtin objects: | |
37 "ParameterList", | |
38 "OutputList", | |
39 "FeatureList", | |
38 "OneSamplePerStep", | 40 "OneSamplePerStep", |
39 "FixedSampleRate", | 41 "FixedSampleRate", |
40 "VariableSampleRate", | 42 "VariableSampleRate", |
41 "TimeDomain", | 43 "TimeDomain", |
42 "FrequencyDomain", | 44 "FrequencyDomain", |
43 */ | 45 */ |
46 | |
44 NULL | 47 NULL |
45 }; | 48 }; |
46 | 49 |
47 PyExtensionManager::PyExtensionManager() | 50 PyExtensionManager::PyExtensionManager() |
48 { | 51 { |
133 } | 136 } |
134 | 137 |
135 void | 138 void |
136 PyExtensionManager::cleanLocalNamespace(const char* plugModuleName) const | 139 PyExtensionManager::cleanLocalNamespace(const char* plugModuleName) const |
137 { | 140 { |
141 DSTREAM << "Cleaning local namespace: " << plugModuleName << endl; | |
142 | |
138 /// these references are all borrowed | 143 /// these references are all borrowed |
139 PyObject *pyPlugModule = PyDict_GetItemString(m_pyGlobalNamespace,plugModuleName); | 144 PyObject *pyPlugModule = PyDict_GetItemString(m_pyGlobalNamespace,plugModuleName); |
140 if (!pyPlugModule) return; | 145 if (!pyPlugModule) return; |
141 PyObject *pyPlugDict = PyModule_GetDict(pyPlugModule); | 146 PyObject *pyPlugDict = PyModule_GetDict(pyPlugModule); |
142 if (!pyPlugDict) return; | 147 if (!pyPlugDict) return; |
158 } | 163 } |
159 | 164 |
160 void | 165 void |
161 PyExtensionManager::updateLocalNamespace(const char* plugModuleName) const | 166 PyExtensionManager::updateLocalNamespace(const char* plugModuleName) const |
162 { | 167 { |
168 DSTREAM << "Updating local namespace: " << plugModuleName << endl; | |
169 | |
163 /// this allows the use of common syntax like: | 170 /// this allows the use of common syntax like: |
164 /// from vampy import * | 171 /// from vampy import * |
165 /// even after several unload/reload cycles | 172 /// even after several unload/reload cycles |
166 | 173 |
167 /// these references are all borrowed | 174 /// these references are all borrowed |