Fix reference counting problem, triggered by subclass-able class not being subclassed, which is detected only by a debug Python build.
This commit is contained in:
1 parent
c54893328a
commit
2ebd5eafbe
1 file changed
+2
-2
@@ -1587,9 +1587,9 @@ static void
|
||||
else:
|
||||
peekref_code = " && self->obj->%s() == 1" % self.memory_policy.peekref_method
|
||||
visit_self = '''
|
||||
if (self->obj %s)
|
||||
if (self->obj && typeid(*self->obj) == typeid(%s) %s)
|
||||
Py_VISIT((PyObject *) self);
|
||||
''' % (peekref_code)
|
||||
''' % (self.helper_class.name, peekref_code)
|
||||
|
||||
code_sink.writeln(r'''
|
||||
static int
|
||||
|
||||
Reference in new issue
Block a user