projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d8e769
)
fix (or work-around?) for base class vtab type cast problem
author
Stefan Behnel
<scoder@users.berlios.de>
Wed, 30 Jul 2008 20:38:38 +0000
(22:38 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Wed, 30 Jul 2008 20:38:38 +0000
(22:38 +0200)
Cython/Compiler/ModuleNode.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ModuleNode.py
b/Cython/Compiler/ModuleNode.py
index 68394529e46eb2d20eeff18d98758827e4725808..33c4e9a4165696e6a4ed51ea5ef3b3f3cf0579f0 100644
(file)
--- a/
Cython/Compiler/ModuleNode.py
+++ b/
Cython/Compiler/ModuleNode.py
@@
-836,8
+836,11
@@
class ModuleNode(Nodes.Node, Nodes.BlockNode):
#if need_self_cast:
# self.generate_self_cast(scope, code)
if type.vtabslot_cname:
- if base_type:
- struct_type_cast = "(struct %s*)" % base_type.vtabstruct_cname
+ vtab_base_type = type
+ while vtab_base_type.base_type and vtab_base_type.base_type.vtabstruct_cname:
+ vtab_base_type = vtab_base_type.base_type
+ if vtab_base_type is not type:
+ struct_type_cast = "(struct %s*)" % vtab_base_type.vtabstruct_cname
else:
struct_type_cast = ""
code.putln("p->%s = %s%s;" % (