mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
interrogate: Code size reduction for generated wrappers
No need to have a separate entry in the string table for every possible class for this uncommon error message
This commit is contained in:
parent
c5d6bae1c3
commit
68927cad0b
@ -1149,7 +1149,7 @@ write_class_details(ostream &out, Object *obj) {
|
|||||||
out << "static void *Dtool_UpcastInterface_" << ClassName << "(PyObject *self, Dtool_PyTypedObject *requested_type) {\n";
|
out << "static void *Dtool_UpcastInterface_" << ClassName << "(PyObject *self, Dtool_PyTypedObject *requested_type) {\n";
|
||||||
out << " Dtool_PyTypedObject *type = DtoolInstance_TYPE(self);\n";
|
out << " Dtool_PyTypedObject *type = DtoolInstance_TYPE(self);\n";
|
||||||
out << " if (type != &Dtool_" << ClassName << ") {\n";
|
out << " if (type != &Dtool_" << ClassName << ") {\n";
|
||||||
out << " printf(\"" << ClassName << " ** Bad Source Type-- Requesting Conversion from %s to %s\\n\", Py_TYPE(self)->tp_name, requested_type->_PyType.tp_name); fflush(nullptr);\n";;
|
out << " printf(\"%s ** Bad Source Type-- Requesting Conversion from %s to %s\\n\", \"" << ClassName << "\", Py_TYPE(self)->tp_name, requested_type->_PyType.tp_name); fflush(nullptr);\n";
|
||||||
out << " return nullptr;\n";
|
out << " return nullptr;\n";
|
||||||
out << " }\n";
|
out << " }\n";
|
||||||
out << "\n";
|
out << "\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user