From: Stefan Behnel Date: Sun, 21 Dec 2008 08:32:57 +0000 (+0100) Subject: don't complain when extension classes 'inherit' from object X-Git-Tag: 0.11-beta~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6bb7b10dca4fd892a4f0324ce47b4398c267e16f;p=cython.git don't complain when extension classes 'inherit' from object --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index dc0255b4..37511511 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -2511,6 +2511,12 @@ class CClassDefNode(ClassDefNode): base_class_scope = env.find_module(self.base_class_module, self.pos) else: base_class_scope = env + if self.base_class_name == 'object': + # extension classes are special and don't need to inherit from object + if base_class_scope is None or base_class_scope.lookup('object') is None: + self.base_class_name = None + self.base_class_module = None + base_class_scope = None if base_class_scope: base_class_entry = base_class_scope.find(self.base_class_name, self.pos) if base_class_entry: