Can't skip subclass tp_new, as that's where the vtable is set up (T808).
authorRobert Bradshaw <robertwb@gmail.com>
Wed, 17 Apr 2013 05:29:18 +0000 (22:29 -0700)
committerRobert Bradshaw <robertwb@gmail.com>
Wed, 17 Apr 2013 05:29:18 +0000 (22:29 -0700)
Cython/Compiler/TypeSlots.py

index b8d6622..ec89fc4 100644 (file)
@@ -339,7 +339,8 @@ class ConstructorSlot(InternalMethodSlot):
         self.method = method
 
     def slot_code(self, scope):
-        if scope.parent_type.base_type \
+        if self.slot_name != 'tp_new' \
+            and scope.parent_type.base_type \
             and not scope.has_pyobject_attrs \
             and not scope.lookup_here(self.method):
             # if the type does not have object attributes, it can