diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2013-05-06 21:15:37 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2013-05-06 21:15:37 +0200 |
commit | 5750dae077a7e5cb09f50810c1d4f9cf09705e82 (patch) | |
tree | c8222ac55550aa7ee56589657ffd1e0cde485489 /Cython/Compiler/ModuleNode.py | |
parent | 8c7c68b3fb2841ba2c007231b85e3acb4de6adfb (diff) | |
download | cython-5750dae077a7e5cb09f50810c1d4f9cf09705e82.tar.gz |
add assertion, just in case
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 22363d556..767699318 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -461,7 +461,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): key_func = operator.attrgetter('objstruct_cname') entry_dict = {} for entry in env.c_class_entries: - entry_dict[key_func(entry.type)] = entry + key = key_func(entry.type) + assert key not in entry_dict + entry_dict[key] = entry env.c_class_entries[:] = self.sort_types_by_inheritance( entry_dict, key_func) |