From 6bb7b10dca4fd892a4f0324ce47b4398c267e16f Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 21 Dec 2008 09:32:57 +0100 Subject: [PATCH] don't complain when extension classes 'inherit' from object --- Cython/Compiler/Nodes.py | 6 ++++++ 1 file changed, 6 insertions(+) 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: -- 2.26.2