changeset 89:f92587bedb2c

Further small tidying
author Chris Cannam
date Thu, 10 Jan 2019 15:52:21 +0000
parents 0120dac53a69
children c4510e5f7a17
files PyExtensionManager.cpp PyPlugin.cpp
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/PyExtensionManager.cpp	Thu Jan 10 15:44:39 2019 +0000
+++ b/PyExtensionManager.cpp	Thu Jan 10 15:52:21 2019 +0000
@@ -135,7 +135,6 @@
 void 
 PyExtensionManager::cleanLocalNamespace(const char* plugModuleName) const
 {
-	
 	/// these references are all borrowed
 	PyObject *pyPlugModule = PyDict_GetItemString(m_pyGlobalNamespace,plugModuleName);
 	if (!pyPlugModule) return;
@@ -183,6 +182,8 @@
 				cerr << "Vampy::PyExtensionManager::updateLocalNamespace: Failed: " 
 				<< name << " of "<< plugModuleName << endl;
 			else DSTREAM << "Updated local name: " << name << endl;
+		} else {
+			DSTREAM << "Local namespace does not contain name: " << name << endl;
 		}
 		Py_DECREF(key);
 	}
@@ -192,7 +193,6 @@
 bool 
 PyExtensionManager::cleanModule(void) const
 {
-		
 	PyObject *m = PyImport_AddModule("vampy");
 	if (!m) {
 		if (PyErr_Occurred()) {PyErr_Print(); PyErr_Clear();}
--- a/PyPlugin.cpp	Thu Jan 10 15:44:39 2019 +0000
+++ b/PyPlugin.cpp	Thu Jan 10 15:52:21 2019 +0000
@@ -64,9 +64,10 @@
 		Py_CLEAR(args);
 		Py_CLEAR(pyInputSampleRate);
 		cerr << "PyPlugin::PyPlugin: Failed to create Python plugin instance for key \"" 
-		<< pluginKey << "\" (is the 1-arg class constructor from sample rate correctly provided?)" << endl;
+		     << pluginKey << "\" (is the 1-arg class constructor from sample rate correctly provided?)" << endl;
 		throw std::string("Constructor failed");
 	}
+
 	Py_INCREF(m_pyInstance);
 	Py_DECREF(args);
 	Py_DECREF(pyInputSampleRate);