From 5af610271e73f76c95889cca4564dc44998c5837 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Mon, 28 Apr 2008 15:55:16 +0100 Subject: [PATCH] Remove the typeid stuff from tp_traverse; it does not seem to be needed anymore (don't remember why I added it in the first place...). --- pybindgen/cppclass.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybindgen/cppclass.py b/pybindgen/cppclass.py index 2429625..200d8ce 100644 --- a/pybindgen/cppclass.py +++ b/pybindgen/cppclass.py @@ -1300,9 +1300,9 @@ static void else: peekref_code = " && self->obj->%s() == 1" % self.peekref_method visit_self = ''' - if (self->obj && typeid(*self->obj) == typeid(%s)%s) + if (self->obj %s) Py_VISIT((PyObject *) self); -''' % (self.helper_class.name, peekref_code) +''' % (peekref_code) code_sink.writeln(r''' static int