From 345db432aa699844287cb0865b1f348cb4e22922 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 13 Sep 2010 16:03:00 -0300 Subject: [PATCH] fix vtable slot filling to silent strict aliasing warnings in Py2 --- Cython/Compiler/ModuleNode.py | 9 --------- 1 file changed, 9 deletions(-) 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 -- 2.26.2