comparison PyPlugScanner.cpp @ 115:a9e918adfff0

Skip directly over anything with null metatype - can happen with plugins whose init methods are not conformant (but that otherwise load OK as code)
author Chris Cannam
date Tue, 26 Feb 2019 14:31:08 +0000
parents efff8e5d90a3
children a38d318c85a9
comparison
equal deleted inserted replaced
114:35ea82e24988 115:a9e918adfff0
209 << endl; 209 << endl;
210 continue; 210 continue;
211 } 211 }
212 212
213 PyTypeObject *metatype = Py_TYPE(item); 213 PyTypeObject *metatype = Py_TYPE(item);
214
215 if (!metatype) {
216 cerr << "ERROR: plugin " << classname
217 << " reports null metatype for Vampy name \""
218 << name << "\" (incomplete due to load error?)"
219 << endl;
220 acceptable = false;
221 break;
222 }
214 223
215 if (!strcmp(name, "frame2RealTime")) { 224 if (!strcmp(name, "frame2RealTime")) {
216 if (metatype != &PyCFunction_Type) { 225 if (metatype != &PyCFunction_Type) {
217 cerr << "ERROR: plugin " << classname 226 cerr << "ERROR: plugin " << classname
218 << " redefines Vampy function name \"" 227 << " redefines Vampy function name \""