Completely get rid of PyClass and PyInstance.
(classobject.[ch] aren't empty yet because they also define PyMethod.)
This breaks lots of stuff, notably cPickle. But it's a step in the right
direction. I'll clean it up later.
(Also a few unrelated changes, e.g. T_NONE to define a "struct member"
that is always None, and simplification of __hash__ -- these are unfinished.)
diff --git a/Python/ceval.c b/Python/ceval.c
index 9a9b98e..07dfdc2 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3409,14 +3409,8 @@
return PyString_AsString(((PyFunctionObject*)func)->func_name);
else if (PyCFunction_Check(func))
return ((PyCFunctionObject*)func)->m_ml->ml_name;
- else if (PyClass_Check(func))
- return PyString_AsString(((PyClassObject*)func)->cl_name);
- else if (PyInstance_Check(func)) {
- return PyString_AsString(
- ((PyInstanceObject*)func)->in_class->cl_name);
- } else {
+ else
return func->ob_type->tp_name;
- }
}
const char *
@@ -3428,13 +3422,8 @@
return "()";
else if (PyCFunction_Check(func))
return "()";
- else if (PyClass_Check(func))
- return " constructor";
- else if (PyInstance_Check(func)) {
- return " instance";
- } else {
+ else
return " object";
- }
}
static void