From 84079e5120f9d53dbdb76c60c2711600b3377c39 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Thu, 16 Dec 2010 22:40:25 -0300 Subject: [PATCH] static storage for typeobjects of private cdef classes --- Cython/Compiler/ModuleNode.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 45feb266..e7e652ef 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -860,7 +860,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): Naming.extern_c_macro, name)) elif entry.visibility == 'public': - #code.putln("DL_EXPORT(PyTypeObject) %s;" % name) code.putln("%s DL_EXPORT(PyTypeObject) %s;" % ( Naming.extern_c_macro, name)) @@ -1593,8 +1592,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): if entry.visibility == 'public': header = "DL_EXPORT(PyTypeObject) %s = {" else: - #header = "statichere PyTypeObject %s = {" - header = "PyTypeObject %s = {" + header = "static PyTypeObject %s = {" #code.putln(header % scope.parent_type.typeobj_cname) code.putln(header % type.typeobj_cname) code.putln( -- 2.26.2