From: Lisandro Dalcin Date: Mon, 13 Sep 2010 19:03:00 +0000 (-0300) Subject: fix vtable slot filling to silent strict aliasing warnings in Py2 X-Git-Tag: 0.14.alpha0~315 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=345db432aa699844287cb0865b1f348cb4e22922;p=cython.git fix vtable slot filling to silent strict aliasing warnings in Py2 --- diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 9eb18e77..27188d3d 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2117,7 +2117,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): entry for entry in type.scope.cfunc_entries if entry.func_cname ] if c_method_entries: - code.putln('#if PY_MAJOR_VERSION >= 3') for meth_entry in c_method_entries: cast = meth_entry.type.signature_cast_string() code.putln( @@ -2126,14 +2125,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): meth_entry.cname, cast, meth_entry.func_cname)) - code.putln('#else') - for meth_entry in c_method_entries: - code.putln( - "*(void(**)(void))&%s.%s = (void(*)(void))%s;" % ( - type.vtable_cname, - meth_entry.cname, - meth_entry.func_cname)) - code.putln('#endif') def generate_typeptr_assignment_code(self, entry, code): # Generate code to initialise the typeptr of an extension