From a9014cf9338b5fb7d5c27127f6aa4d9d62f2a8c6 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 20 Feb 2013 10:44:48 +0000 Subject: [PATCH] reenable tp_richcompare (thanks David) --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index 03ba9a3dd4..38d7ddb06d 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1669,7 +1669,7 @@ write_module_class(ostream &out, Object *obj) { out << " " << args_cleanup << "\n"; out << " if (PyErr_Occurred()) {\n"; out << " return (PyObject *)NULL;\n"; - out << " }\n"; + out << " }\n\n"; out << " Py_INCREF(Py_NotImplemented);\n"; out << " return Py_NotImplemented;\n"; @@ -1752,9 +1752,9 @@ write_module_class(ostream &out, Object *obj) { out << "#endif\n"; } -// if (has_local_richcompare) { -// out << " Dtool_" << ClassName << ".As_PyTypeObject().tp_richcompare = &Dtool_RichCompare_" << ClassName << ";\n"; -// } + if (has_local_richcompare) { + out << " Dtool_" << ClassName << ".As_PyTypeObject().tp_richcompare = &Dtool_RichCompare_" << ClassName << ";\n"; + } if (has_local_repr) { out << " // __repr__\n";